// TUBE / Sea Anemone '99.02 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.1; global_settings { assumed_gamma 2.2 } #macro Texture_c ( Cred, Cgreen, Cblue, Ctr, Ref ) texture { pigment {color rgbt } finish { ambient 0.5 phong 0.4 reflection Ref specular 1.2 brilliance 0.8 } } #end #macro Multi_ring (Ro, Nt) #declare Rn = 8 ; #declare Pne = 4*Nt*Nt ; #declare Rt = pi*2/(Nt-0.5) ; #declare Yt = 2*pi/Nt/4/Nt ; #macro Ka (P) 2*pi*P/Pne #end #macro Rs (P) #declare Rsp = 0.6+sin(P/Pne*pi*2-1*pi) ; #if (Rsp>0) Ro*sqrt(Rsp)*0.15 #else 0 #end #end #macro Rl (P,Ry) Ro*(1+Ry*cos(P/Pne*pi*2)*cos(P/Pne*pi*2)) #end #macro Ptri (P) #declare Mdfy = 0.1*sin(P/Rn/Pne*pi*2.3*24) ; #end #macro Triangle_units (P1,P2,P3) #declare Mdfy = 0.1*sin(P1/Rn/Pne*pi*2.1*24) ; smooth_triangle { Ptri(P1), Ptri(P2), Ptri(P3) Texture_c ( 1+0.4*cos(P1/Pne*2*pi-pi/2), 0.4-0.6*cos(P1/Pne*2*pi-pi/2),0,0,0.4 ) } #end union { #declare Pn =0; #while (Pn < Rn*Pne+Nt) Triangle_units (Pn,Pn-1,Pn-Nt) Triangle_units (Pn,Pn-Nt+1,Pn-Nt) #declare Pn =Pn +1; #end } #end light_source {<2000, 200, 1000> color rgb <1,1,1>} object { Multi_ring (4, 18) rotate y*20 } background { color rgb <0,0,0.2> } camera { location <0,50,50> angle 13.8 look_at <0,-0, 0> }