/* Courbege x=cos(u) y=sin(u)) z=cos(2*u) paramétrique en mettant les bonnes formules dans CX, CY, CZ */ #include "colors.inc" #include "stones.inc" #macro xx(uu) cos(uu)+2*cos(2*uu) #end #macro yy(uu) sin(uu)-2*sin(2*uu) #end #macro zz(uu) 2*sin(3*uu) #end //Lights, camera, action camera { orthographic location < 0,2,-10> angle 52 look_at < 0,0.1, 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 } sphere { <0,-3,0>,10 pigment { gradient z color_map { [ 0.1 color Blue*1.2 ] [ 1.0 color rgb <0.3,1,1>*1.1 ] } scale 4 translate <0,0,10> } clipped_by{ box {<-10,-10,0>,<10,10,20>}} bounded_by{ clipped_by } } //background{ SkyBlue*1.25 } //rgb <0.8,0.7,0.5>*1.1} // // --------------------------------------- #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; #declare iter = 200; #declare r = 0.75; #declare coeff=0.7; union{ courbe(iter,umin,umax,r)// texture { T_Gold_5A} texture { T_Stone16 scale 0.3} finish{ ambient 0.2 diffuse 0.4 reflection 0.1 specular 0.9 roughness 0.000001} rotate <0,30,-21> }//union cone{<0,-6,0>,2, <0,-2.8,0>,3 texture { pigment { color rgb <1,0.7,0.2> } normal { granite 0.4 turbulence 0.2 scale 0.4 accuracy 0.001 } finish { diffuse 0.65 ambient 0.015 } } } /* texture { pigment { granite color_map { [ 0.1 color red 1 green 1 blue 1] [ 0.2 color red 0.9 green 0.9 blue 0.5] [ 0.6 color red 1 green 0.7 blue 0] [ 0.8 color red 0.5 green 0.5 blue 0.1 filter 0.5] } // color_map scale 0.4 } // fin pigment finish { diffuse 0.2 ambient 0.6 reflection 0.1 roughness 0.01 specular 0.8 } } // fin texture // */