// SHELL / Like an Ammonite '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.5 reflection 0.3 specular 0.2 brilliance 0.3 irid {0.6 thickness 1.5 turbulence 0.2} } } #end #macro Shell_a (Ro, Nt, Ra, Rb, Na, Ho) #declare Pne = 4*Nt*Nt; #declare Rt = pi*2/(Nt-0.5); #declare Yt = 2*pi/Nt/4/Nt; #macro Ka (P) Yt*P #end #macro Rs (P) 0.8*Ro*pow(Ra,P)/Rb*(1+0.2*pow(cos(P/Nt/2),10)+0.04*cos(P*28)*cos(P*30)) #end #macro Rl (P) Ro*pow(Ra,P) #end #macro Hl (P) Ho*pow(Ra,P) #end #macro Triangle_units (P1,P2,P3) smooth_triangle { , , , Texture_c (0.2*cos(Rt*P1)+0.2*sin(P1/Nt)+0.2, 0.5*cos(Rt*P1)+0.5*sin(P1/Nt)+0.3, 1, 0) } #end union { #declare Pn =-0; #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,0,400> angle 3.1 look_at <0, 0, 0> } light_source {<5000, 10000, 2000> color rgb <1,1,1>} object { Shell_a (8,24,0.9995,1.4,3.5,0) rotate x*-40 translate <-3,-2,0> } background { color rgb <0,0,0.3> }