// POLAR / Rotation '00.02 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.1; global_settings { max_trace_level 3 assumed_gamma 2.2 } light_source {<20000, 100000, -50000> color <0.5,0.5,1>} light_source {<-60000, -30000, -40000> color <0.5,1,0.5>} camera { location <0,0,-10000> angle 3.2 look_at <-5, 5, 0> } #declare Rdg=100; //radius of arranging sphere //initialize the coordinates for mesh Cp(x,y,z,r) #declare Vmax=72; #declare Hmax=4*Vmax; #declare Cp=array[Hmax][Vmax+2][4] #declare V=0; #while (V } triangle { } #end //normal vector of the plar coordinates point #macro Vd (Ph,Pv) <(Cp[mod(Ph-1+Hmax,Hmax)][Pv][1]-Cp[Ph][Pv][1])*(Cp[Ph][Pv-1][2]-Cp[Ph][Pv][2])-(Cp[Ph][Pv-1][1]-Cp[Ph][Pv][1])*(Cp[mod(Ph-1+Hmax,Hmax)][Pv][2]-Cp[Ph][Pv][2]), (Cp[Ph][Pv-1][0]-Cp[Ph][Pv][0])*(Cp[mod(Ph-1+Hmax,Hmax)][Pv][2]-Cp[Ph][Pv][2])-(Cp[mod(Ph-1+Hmax,Hmax)][Pv][0]-Cp[Ph][Pv][0])*(Cp[Ph][Pv-1][2]-Cp[Ph][Pv][2]), (Cp[mod(Ph-1+Hmax,Hmax)][Pv][0]-Cp[Ph][Pv][0])*(Cp[Ph][Pv-1][1]-Cp[Ph][Pv][1])-(Cp[Ph][Pv-1][0]-Cp[Ph][Pv][0])*(Cp[mod(Ph-1+Hmax,Hmax)][Pv][1]-Cp[Ph][Pv][1])> #end //smooth_triangle of the surface #macro Trisd (Ph,Pv) #declare Ph1=mod(Ph-1+Hmax,Hmax); smooth_triangle { Vd(Ph,Pv) Vd(Ph1,Pv-1) Vd(Ph,Pv-1) } smooth_triangle { Vd(Ph1,Pv) Vd(Ph1,Pv-1) Vd (Ph,Pv) } #end #declare V=0; #while (V} finish { reflection 2 ambient -0.2 phong 1 brilliance 1 diffuse 1 } normal { bumps 1 scale 20 } } scale z*2/3 rotate <60,320,0> no_shadow } background {color rgbt <0,0,0.2>}