/* noeud torique */ #include "colors.inc" #include "metals.inc" //Lights, camera, action camera { orthographic location < 0,2,-10> angle 48 look_at < 0,0, 0> } light_source { <-2, 8,-8> color rgb <0.9,1,1> area_light <1,0,0>, <0,0,1>,4, 4 jitter } light_source { <5, 3, -15> color rgb <0.9,1,1> shadowless } light_source { <5, -3, 15> color rgb <0.9,1,1> shadowless } #declare R = 3; //---- le fond --------------------- sphere { <0,-0.3,0>,2*R pigment { gradient z color_map { [ 0.1 color Blue*1.2 ] [ 1.0 color rgb <0.3,0.9,1>*1.1 ] } scale 4 translate <0,0,-2> } clipped_by{ box {<-2*R,-2*R,0>,<2*R,2*R,2*R+1>}} bounded_by{ clipped_by } } // --------------------------------------- #declare ro = 0.2; #declare p = 3; #declare q = 1; #macro xx(uu) (R+ro*cos(p*uu/q))*cos(uu) #end #macro yy(uu)(R+ro*cos(p*uu/q))*sin(uu) #end #macro zz(uu) ro*sin(p*uu/q) #end #macro courbe(n,deb,fin,r) #local pas=(fin-deb)/n; #local uu = deb; #while (uu<=fin) #local vv=uu+pas; cylinder{ ,,r} sphere{ ,r } #local uu=vv; #end //fin boucle #end //macro // --------------------------------------- #declare umin = 0; #declare umax = 2*pi*q; #declare r = 0.14; #declare iter = 500; #declare ang=30; // --------------------------------------- union{ courbe(iter,umin,umax,r) texture { T_Silver_3A } finish{ ambient 0.1 diffuse 0.6 specular 0.4 roughness 0.000001} rotate <0,0,3*ang> } union{ courbe(iter,umin,umax,r) texture { T_Gold_5A } finish{ ambient 0.2 diffuse 0.6 specular 0.7 roughness 0.000001} rotate <0,0,1> } union{ courbe(iter,umin,umax,r) texture { T_Gold_1E } finish{ ambient 0.2 diffuse 0.4 reflection 0.1 specular 0.7 roughness 0.000001} rotate <0,0,2*ang> } union{ courbe(iter,umin,umax,r) texture { T_Gold_1C } finish{ ambient 0.2 diffuse 0.6 specular 0.7 roughness 0.000001} rotate <0,0,ang> }