// SHELL / Like a Pink 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_e (Ro, Nt, Rao, Rb, Na, Ho, Pxz, Dy) #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*(1+0.1*pow(sin(1.5*Rt*P+1.1*pi),2)) #end #macro Rl (P) 0.7*Ro*pow(Ra,P) #end #macro Hl (P) Ho*pow(Ra,P*P) #end #macro Ka (P) Dy*12*Yt*pow(P,0.9) #end #macro Triangle_units (P1,P2,P3) smooth_triangle { , , , Texture_c (1, 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), 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,50,-300> angle 3.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>} union { object {Shell_e (10,72,0.988,1.2,0.2,1,1.00,1) translate x*1 rotate z*219 } object {Shell_e (10,72,0.988,1.2,0.2,1,1.00,-0.8) translate x*1 rotate z*188 } scale z*1.3 rotate x*180 rotate y*120 translate < -3.7,-3.7,-5> } background { color rgb <0,0,0.3> }