/*========================================================= Nastro Metodi e Modelli Matematici Gian Marco Todesco, novembre 2007 http://archinet.uniroma3.it/mate/metodi/2007 =========================================================*/ #include "colors.inc" #include "textures.inc" camera { location 0.9*<2,1,-4> right x*image_width/image_height look_at <0,0,0> angle 40 } light_source { <1,4,-2> color 1 } light_source { <-1,2,-6> color 0.5 shadowless} light_source { < 1,2,-6> color 0.5 shadowless} plane { y,-1.1 pigment { White } } // // Curva(T) definisce il percorso del centro del nastro // #macro Curva(T) #local Phi = 12*pi*T; #local R = 0.6*(1.25 - sin(pi*T)); #local Y = cos(pi*T); #end #declare Texture_Bordo = Silver_Metal; #declare Texture_Nastro = texture { pigment {Aquamarine} finish { ambient 0.6 diffuse 0.1 specular 0.3 roughness 0.1 } } // // creo il nastro // union { #local N = 5000; #declare Spessore = 0.01; #local OldP0 = <0,0,0>; #local OldP1 = <0,0,0>; #local I = 0; #while(I0) cylinder { P0,OldP0,Spessore texture {Texture_Bordo}} cylinder { P1,OldP1,Spessore texture {Texture_Bordo}} triangle { P0, P1, OldP0 texture {Texture_Nastro}} triangle { P1, OldP0, OldP1 texture {Texture_Nastro}} #end #local OldP0 = P0; #local OldP1 = P1; #local I = I + 1; #end rotate 90*z }