/* Courbe du Dragon */ #include "colors.inc" #include "metals.inc" #declare r=0.2 ; camera { location <-0.3,0,-1.2> look_at<-0.52,-0.1,0>} light_source { <-3,3,-5> color rgb<0.8,0.8,1>*0.8 } light_source { <2,3,-3> color White} background { rgb <0.9,0.95,0.95>*1.} #macro dragon(n) #if(n=1) union { cylinder { <0,0,0>,<1,0,0>,r} sphere { <0,0,0>,r} sphere { <1,0,0>,r} } #else union { object { dragon(n-1) } object { dragon(n-1) rotate <0,0,-90> } translate < cos((n)*pi/4),sin((n)*pi/4),0> scale 1/sqrt(2) } #end #end #declare n=6; // NBRE ITERATIONS object { dragon(n) texture{ T_Copper_3B } rotate <0,0,-(n+3)*45> // pour le mettre sur "ses pattes"(??) finish {ambient 0.5 diffuse 0.6 specular 0.81 roughness 0.001} }