/*========================================================= Metodi e Modelli Matematici Gian Marco Todesco, ottobre 2007 http://archinet.uniroma3.it/mate/metodi/2007 =========================================================*/ #include "colors.inc" #include "textures.inc" camera { location <0,6,-5> right x*image_width/image_height look_at <0,0.2,0> angle 35 } light_source { <2,10,-3> color 1 } plane {y,-1 pigment {White}} #declare Sezione = union { #local R0 = 1; #local R1 = 0.65; #local D = 0.06; #local Angolo = 80; difference { union { torus { R0, D } torus { R1, D } difference { cylinder {-D*y,D*y, R0} cylinder {-(D+0.1)*y,(D+0.1)*y, R1} } } plane {x,0 rotate -Angolo*y} plane {x,0 rotate Angolo*y} } // bordo laterale della striscia union { sphere {<0,0,-R1>, D} sphere {<0,0,-R0>, D} cylinder {<0,0,-R0>, <0,0,-R1>, D} rotate -Angolo*y } // bordo laterale della striscia union { sphere {<0,0,-R1>, D} sphere {<0,0,-R0>, D} cylinder {<0,0,-R0>, <0,0,-R1>, D} rotate (180+Angolo)*y } } #declare Scala = union { #local I = 0; #while(I<20) object { Sezione translate y*(0.15*I-1) rotate y*(20-20*I) } #local I = I + 1; #end } object { Scala texture { pigment {Aquamarine} finish {Metal} } } object { Scala rotate 180*y texture { pigment {Orange} finish {Metal} } }