/*========================================================= Metodi e Modelli Matematici Gian Marco Todesco, ottobre 2007 http://archinet.uniroma3.it/mate/metodi/2007 =========================================================*/ #version 3.6; #include "colors.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- camera { location 2*<0.0, 30, -40.0> right x*image_width/image_height look_at <0.0, 0.0, 0.0> angle 30 } sky_sphere { pigment { gradient y color_map { [0.0 rgb <0.6,0.7,1.0>] [0.7 rgb <0.0,0.1,0.8>] } } } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-30, 30, -30> } // ---------------------------------------- plane { y, -1 pigment { color rgb <0.7,0.5,0.3> } } #macro Casa_Con_Porte( Larghezza_Porta, Numero_Porte) difference { #local Larghezza_Casa = Larghezza_Porta * Numero_Porte + 3 * (Numero_Porte + 1); box { <-0.5*Larghezza_Casa,-1,0>, < 0.5*Larghezza_Casa,12,10> pigment {Green} } #declare I = 0; #while(I, pigment {Red} } #declare I = I + 1; #end } #end // ---- fine della macro ----- Casa_Con_Porte(3, 6)