// TUBE / Golden Vortex '99.02 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.1; global_settings { assumed_gamma 2.2 } #include "colors.inc" #macro Texture_c ( Cred, Cgreen, Cblue, Ctr ) texture { pigment {color rgbt } finish { ambient 0.5 phong 3 reflection 0.4 specular 0.8 brilliance 1 } } #end #macro Gold_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) 0.85*Ro*pow(0.999164911685,P)/1.146351//Nt=12 0.85*Ro*pow(0.99666382864,P)/1.146351 #end #macro Rl (P) Ro*pow(0.999164911685,P)//Nt=12 Ro*pow(0.99666382864,P) #end #macro Ptri (P) , #end #macro Triangle_units (P1,P2,P3) smooth_triangle { , , , Texture_c ( 0.5+0.5*cos(Rt*P1),0.5+0.5*sin(Rt*P1),0.5-0.5*cos(Rt*P1),0.8-P1/5000 )} #end union { #declare Pn =0; #while (Pn < 3*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,100,50> angle 3.8//12.5 look_at <1.6, 0, -1.2> } light_source {<500, 1000, -200> color rgb <1,1,1>} object { Gold_ring (3, 24) rotate <-90,0,0> translate <-0,0,0> } background { color rgb <0,0,0.2> }