// SHELL / Like a Giant Clam '99.04 // 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) texture { pigment {color rgbt } finish { ambient 0.3 phong 0.3 reflection 0.2 specular 0.4 brilliance 0.5 irid {0.8 thickness 0.8 turbulence 0.1} } } #end #macro Shell_b (Ro, Nt, Rao, Rb, Na, Ho, Pxz) #declare Ra = pow(Rao,12/Nt); #declare Pne = 4*Nt*Nt; #declare Rt = pi*2/(Nt-0.5); #declare Yt = 2*pi/Nt/4/Nt; #macro Rs (P) 0.85*Ro*pow(Ra,P)/Rb #end #macro Rl (P) 0.7*Ro*pow(Ra,P) #end #macro Hl (P) Ho*pow(Ra,P*P) #end #macro Ka (P) 12*Yt*pow(P,0.9) #end #macro Triangle_units (P1,P2,P3) smooth_triangle { , , , Texture_c (0.4*cos(Rt*P1)+0.2*sin(2*P1/Nt)+0.3+0.2*cos(P1*100), 0.3*cos(Rt*P1)+0.3*sin(2*P1/Nt)+0.5+0.2*cos(P1*100), 1, 0) } #end union { #declare Pn =Nt+int(Nt/2); #while (Pn < Na*Pne-Nt) Triangle_units (Pn,Pn-1,Pn-Nt) Triangle_units (Pn,Pn-Nt+1,Pn-Nt) #declare Pn =Pn +1; #end } #end camera { location <0,200,-500> angle 1.5 look_at <0, 0, 0> } light_source {<500, 1000, 2000> color rgb <1,1,1>} light_source {<0, -2000, -1000> color rgb <1,0,0>} object { Shell_b (10,72,0.988,1.2,0.2,1,1.2) rotate z*160 rotate y*120 translate < -2.8,-3,0> } background { color rgb <0, 0, 0.3> }