// COIL / DUET '99.01 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.1; global_settings { assumed_gamma 2.2 } camera { location <0,20,-160> angle 75 look_at <45, 0, 0> } light_source {<500, 1000, -200> color rgb <1,1,1>} light_source {<-300, 200, -500> color rgb <1,1,1>} #declare Texture_c = texture { pigment {color rgb <0.3, 0.4, 0.5>} finish { ambient 0.5 phong 0.3 reflection 0.3 specular 1 brilliance 1 } } #macro Smooth_coil (Ro, Nt, Dr, Zr, Zn) //(4, 6, 0.2, 4, 5) #declare Pne = 4*Nt*Nt; #declare Dt = Dr/Nt; #declare Rt = pi*2/(Nt-0.5); #declare Yt = 2.0035*pi/Nt/4/Nt; //Nt=4 2.0317 Nt=6 2.014 Nt=9 2.006 Nt=12 2.0035 #declare Zc = Zr/Pne; #macro Triangle_units (P1,P2,P3) smooth_triangle { , , , , , } #end union { #declare Pn =0; #while (Pn < Zn*Pne) Triangle_units (Pn,Pn-1,Pn-Nt) Triangle_units (Pn,Pn-Nt+1,Pn-Nt) #declare Pn =Pn +1; #end } #end object {Smooth_coil (50, 12, 0.5, 10, 20) //(Ro, Nt, Dr, Zr, Zn) texture {Texture_c} scale 1.2 rotate <0,85,0> translate <-60,0,0> }