// SHELL / Like a Trumpet Shell '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.2 phong 0.3 reflection 0.4 specular 0.1 brilliance 0.5 irid {0.5 thickness 0.5 turbulence 0.1} } } #end #macro Shell_c (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.85*Ro*pow(Ra,P)/Rb*(1+0.05*cos(P*30)) #end #macro Rl (P) 0.8*Ro*pow(Ra,P) #end #macro Hl (P) Ho*pow(Ra,P) #end #macro Triangle_units (P1,P2,P3) smooth_triangle { , , , Texture_c (1, 0.3*cos(Rt*P1)+0.3*sin(P1/Nt)+0.5, 0.3*cos(Rt*P1)+0.3*sin(P1/Nt)+0.2, 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,500> angle 4.6 look_at <0, 0, 0> } light_source {<500, 1000, 200> color rgb <1,1,1>} light_source {<3000, 2000, -5000> color rgb <1,1,1>} object { Shell_c (8,12,0.999,1.2,10,15) rotate z*180 rotate <90,0,90> translate <-20,0,0> } background { color rgb <0,0,0.3> }