// TUBE / Castle of Idea '99.02 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.1; global_settings { assumed_gamma 2.2 max_trace_level 10 } #include "colors.inc" #macro Texture_c ( Cred, Cgreen, Cblue ) texture { pigment {color rgbt } finish { ambient 0.3 phong 1 reflection 0.6 specular 0.8 brilliance 0.8 } } #end #macro Clain_ring (Ro, Nt) #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) Ro*pow(0.9985,P)*0.6 #end #macro Rl (P) Ro #end #macro Ptri (P) , #end #macro Triangle_units (P1,P2,P3) smooth_triangle { Ptri(P1), Ptri(P2), Ptri(P3) } #end union { #declare Pne = 4*Nt*Nt; #declare Pn =0; #while (Pn < 2*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,-100> angle 4.5//12.5 look_at <0.3, -0, 0> } light_source {<500, 1000, -200> color rgb <1,1,1>} light_source {<0, 0, 0> color rgb <0.6,0,0>} object {Clain_ring (3, 16) Texture_c ( 0,0,0 ) rotate <120,50,0> } background { color rgb <0,0,0.2> }