// ====================================================================== // TP02 - Ricardo Saffi Marques - RA: 037415 // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.20, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_plastico2 = texture{ pigment{ color rgb < 2.50, 0.10, 0.30 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare raio = 0.400; #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #declare espatula = sphere { <0,0,0>, raio scale <1, 0.2, 2> } #declare haste = box{ < 0.00, 0.00, 0.00 >, < 0.20, 0.20, 4.00 > texture{ tx_plastico2 } } #macro coisa (A) union{ union{ object{ haste } object{ espatula translate <0,0,4> } rotate } union{ object{ haste } object{ espatula translate <0,0,4> } rotate <-A/2,0,0> } } #end // CENA union{ object{ chao translate < 0,0,-5 > texture{ tx_xadrez } } object{ coisa (30) } object{ coisa (45) translate <5,5,0> } object{ coisa (60) translate <10,10,0> } } #include "camlight.inc" #declare centro_cena = < 5.00, 5.00, 3.00 >; #declare raio_cena = 10.0; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 50.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)