// HEAVE / The navel of the sea '03.05 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.5; global_settings { max_trace_level 5 assumed_gamma 2.2 } light_source {<1600, 2000, 1500> color rgb <1, 1, 1>} #macro Wave (Xo, Yo, Zo, To, Lo, Xpo, Zpo) #declare Xo = 50*Lo-1000; #declare Zo = 15*To+15*cos(3*To/pi+pi*1.5)/(0.001*pow(Xo-Xpo,2)+0.001*pow(Zo-Zpo,2)+0.3)-500; #declare Yo = 12*sin(3*To/pi+pi*1.5)/(0.00005*pow(Xo-Xpo,2)+0.00005*pow(Zo-Zpo,2)+0.3); #declare Lxz = sqrt(Xo*Xo+Zo*Zo); #declare Yo = Yo-50/(0.00005*pow(Xo-Xpo,2)+0.00005*pow(Zo-Zpo,2)+0.5); #end //***************** Mesh treatment ***************** //triangle of the surface #macro Trid (Ph,Pv) #declare Phs1 = Ph-1; triangle { } triangle { } #end //normal vector of the point #macro Vd (Ph,Pv) <(Cp[Ph-1][Pv][1]-Cp[Ph][Pv][1])*(Cp[Ph][Pv-1][2]-Cp[Ph][Pv][2]) -(Cp[Ph][Pv-1][1]-Cp[Ph][Pv][1])*(Cp[Ph-1][Pv][2]-Cp[Ph][Pv][2]), (Cp[Ph][Pv-1][0]-Cp[Ph][Pv][0])*(Cp[Ph-1][Pv][2]-Cp[Ph][Pv][2]) -(Cp[Ph-1][Pv][0]-Cp[Ph][Pv][0])*(Cp[Ph][Pv-1][2]-Cp[Ph][Pv][2]), (Cp[Ph-1][Pv][0]-Cp[Ph][Pv][0])*(Cp[Ph][Pv-1][1]-Cp[Ph][Pv][1]) -(Cp[Ph][Pv-1][0]-Cp[Ph][Pv][0])*(Cp[Ph-1][Pv][1]-Cp[Ph][Pv][1])> #end //smooth_triangle of the surface #macro Trisd (Ph,Pv) #declare Blue = texture { pigment {color rgb <0.2, 0.7, 0.5>} finish {reflection 0.7 ambient 0.1 phong 1 diffuse 0.5 brilliance 1} normal {ripples 1 rotate y*0 scale 70 frequency 15 rotate y*60 translate <300, 0, 500>} } smooth_triangle { Vd(Ph,Pv) Vd(Ph-1,Pv-1) Vd(Ph,Pv-1) texture {Blue} } smooth_triangle { Vd(Ph-1,Pv) Vd(Ph-1,Pv-1) Vd(Ph,Pv) texture {Blue} } #end #declare Tmax = 150; #declare Lmax = 50; #declare Cp = array[Tmax][Lmax][3] #declare T = 0; #while (T] [1.0 rgb <0, 0.3, 0.8>] } } } camera { location <0, 1000, -80> angle 40 look_at <90, 840, 0> }