// NET / Winding Triangle Net '00.11 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.1; global_settings { max_trace_level 5 assumed_gamma 2.2 } light_source {<40, 20, 80> color <1.2,1,1>} camera { location <0, -40, -50> angle 24 look_at <0, 0, 0> } #declare Rsize=0.125; #declare Tecs = texture { pigment {color rgbt <0.2,0.8,1,0.8>} finish { reflection 1 phong 2 brilliance 1 ambient 0.4 } } #declare Imax=2000; #declare Cp=array[Imax][2] #declare I=0; #while (I Rsize texture { Tecs } no_shadow } #end #macro Cydr (Cpt, Cpe) cylinder { Rsize texture { Tecs } no_shadow } #end #macro Acosc (Rc,Dy,Ac) #declare Ac=acos(Rc); #if (Dy<0) #declare Ac=2*pi-Ac; #end #if (Ac=0) #declare Ac=2*pi; #end #end #declare I=0; #while (I<6) #declare Pe=1+I; #declare Cp[Pe][0]=Cp[0][0]+2*cos(pi/3*I); #declare Cp[Pe][1]=Cp[0][1]+2*sin(pi/3*I); Spdr (Pe) Cydr (Pe,0) Cydr (Pe,Pe-1) #declare I=I+1; #end Cydr (6,1) #declare Ap=0; #declare As=0; #declare Al=0; #declare Ae=0; #declare Ad=0; #declare Rndm = seed(9); #macro Spculc (N,P,Pe) #declare Rs=sqrt(pow(Cp[P][0]-Cp[N][0],2)+pow(Cp[P][1]-Cp[N][1],2))/4; Acosc((Cp[P][0]-Cp[N][0])/4/Rs,Cp[P][1]-Cp[N][1],Ap) #declare Re=sqrt(pow(Cp[N+1][0]-Cp[N][0],2)+pow(Cp[N+1][1]-Cp[N][1],2))/4; Acosc((Cp[N+1][0]-Cp[N][0])/4/Re,Cp[N+1][1]-Cp[N][1],Ae) Acosc(Rs,1,As) Acosc(Re,1,Al) #if (rand(Rndm)>0.5) #declare Ad=rand(Rndm); #end #if (Ae-Ap<0) #declare Ap=Ap-2*pi; #end #if (Ae-Ap-As-Al-Ad>0) #declare I=0; #while (I0) #declare I=0; #while (I