// HOSE / Statues '00.03 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.1; global_settings { max_trace_level 10 assumed_gamma 2.2 } camera { location <40,20,-50> angle 75 look_at <5, 30, 0> } #declare Rndm = seed(59); #declare Xmax=3*4+1; #declare Ymax=3*4+1; #declare Cplz=array[Xmax+1][Ymax+1] #declare X=0; #while (X } triangle { } #end //normal vector of the 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 Green = texture { pigment { color rgb } finish { reflection 0.8 ambient 0.2 phong 1 diffuse 0.5 brilliance 1 } normal {ripples 1 scale 30 frequency 15 } } #declare Ph1=mod(Ph-1+Hmax,Hmax); smooth_triangle { Vd(Ph,Pv) Vd(Ph1,Pv-1) Vd(Ph,Pv-1) texture { Green} } smooth_triangle { Vd(Ph1,Pv) Vd(Ph1,Pv-1) Vd (Ph,Pv) texture { Green} } #end //***************** Hose coordinates ***************** #declare Rdgg=1; //radius of arranging sphere #macro Vrect (P) #if (Cc[P][2]-Cc[P-1][2]=0) #declare Cc[P-1][2]=Cc[P-1][2]-0.000001; #end #declare Vvx=Cc[P][0]-Cc[P-1][0]; #declare Vvy=Cc[P][1]-Cc[P-1][1]; #declare Vvz=Cc[P][2]-Cc[P-1][2]; #declare Vvl=sqrt(Vvx*Vvx+Vvy*Vvy+Vvz*Vvz)+0.000001; #declare Vvx=Vvx/Vvl; #declare Vvy=Vvy/Vvl; #declare Vvz=Vvz/Vvl; #declare Vxz=(Cc[P-1][0]-Cc[P][0])/(Cc[P][2]-Cc[P-1][2]); #declare Vxl=sqrt(1+Vxz*Vxz); #declare Vxx=1/Vxl; #declare Vxy=0; #declare Vxz=Vxz/Vxl; #declare Vyz=-(Cc[P][1]-Cc[P-1][1])*(Cc[P][2]-Cc[P-1][2])/(pow(Cc[P][0]-Cc[P-1][0],2)+pow(Cc[P][2]-Cc[P-1][2],2)); #declare Vyx=Vyz*(Cc[P][0]-Cc[P-1][0])/(Cc[P][2]-Cc[P-1][2]); #declare Vyl=sqrt(Vyx*Vyx+1+Vyz*Vyz); #declare Vyx=Vyx/Vyl; #declare Vyy=1/Vyl; #declare Vyz=Vyz/Vyl; #if (Cc[P][2]-Cc[P-1][2]<0) #declare Vxx=-Vxx; #declare Vxz=-Vxz; #end #if (Cc[P][2]-Cc[P-1][2]=0) #declare Cc[P-1][2]=Cc[P-1][2]+0.000001; #end #end #macro Armm (Atwist, Pallx,Pally,Pallz, Vallys,Vallyc,Vallyd,Vallz) #declare Z=0; #while (Z } #end union{ plane { z, 3 } #declare I=0; #while (I<1) #declare J=-30; #while (J<4) //initialize the coordinates for mesh Cp(x,y,z,r) #declare Zmax=32+J; #declare Hmax=4; #declare Cp=array[Hmax][Zmax+2][4] #declare Cc=array[Zmax+2][3] //Center of polar coordinates #declare Z=0; #while (Z } #declare J=J+2; #end #declare I=I+6; #end texture { pigment { color rgb<0, 0.5, 1> } finish { reflection 0.8 ambient 0.2 phong 1 diffuse 0.5 brilliance 1 } normal { ripples 1 scale 30 frequency 15 } } rotate x*-90 no_shadow } light_source {<100, 200, -200> color <1,1,1>} background { color rgb <0,0,0.2> } fog { fog_type 2 fog_alt 6 fog_offset 0 distance 30 color rgb <0.6,0.4,1> }