// Last edited on 2003-04-12 07:45:19 by stolfi // MC930 - POV-Ray, Exercicio 5 // Fabio de Souza Azevedo - RA 952215 // Aula de 01/04/2003 #include "colors.inc" //background { color rgb < 0.15, 0.30, 0.07 > } background { color rgb < 0.07, 0.30, 0.30 > } // (camera alterada para gerar imagem com proporcao 3:1; // Makefile tambem foi alterado!) // Para ver meio em perspectiva /* camera { location < -1.5, 0.8, -3.3 > look_at < 0.0,-0.35, 0.00 > right <1.2, 0, 0> up <0, 0.4, 0> } */ // Para ver de frente camera { location < 0.0, 10.0, -25.0 > right <1.2, 0, 0> up <0, 0.4, 0> look_at < 0.0, 2.0, 0.0 > } light_source { < 0.00, 18.00, -15.00 > color rgb 1.2*< 1.00, 1.00, 1.00 > } light_source { < 7.00, 7.00, -15.00 > color rgb 0.9*< 1.00, 1.00, 1.00 > } #declare plano = plane { <0,1,0>,-1.0 pigment { rgb < 0.15, 0.30, 0.07 > } } /* #declare estante1 = union { cylinder { <0, 0, 0>, <0, 0.1, 0>, 2.0 } cylinder { <0, 0, 0>, <0, 6, 0>, 0.1 } box { <-2.0, 2, -2.0>, <2.0, 2.1, 2.0> } box { <-2.5, 3, -2.5>, <2.5, 3.1, 2.5> } box { <-3.0, 4, -3.0>, <3.0, 4.1, 3.0> } box { <-3.5, 5, -3.5>, <3.5, 5.1, 3.5> } pigment { rgb <1.0, 1.0, 0.0> } } */ #declare estante1 = union { // base: cylinder { <0, 0, 0>, <0, 0.1, 0>, 2.0 } cylinder { <0, 0, 0>, <0, 6, 0>, 0.1 } // prateleiras: #declare i = 0; #while (i < 4) #declare d = 2; #declare prateleira = box { <-d, i+2, -d>, } object { prateleira } #declare i = i + 1; #declare d = d + 0.5; #end pigment { rgb <1.0, 1.0, 0.0> } } /* #declare estante2 = union { box { <-1, 0, -1>, <1, 0.1, 1> } box { <-0.1, 0.1, -0.1>, <0.1, 6.0, 0.1> } cylinder { <0, 2, 0>, <0, 2.1, 0> 3.5 } cylinder { <0, 3, 0>, <0, 3.1, 0> 3.0 } cylinder { <0, 4, 0>, <0, 4.1, 0> 2.5 } cylinder { <0, 5, 0>, <0, 5.1, 0> 2.0 } pigment { rgb <1.0, 0.0, 0.0> } } */ #declare estante2 = union { // base: box { <-1, 0, -1>, <1, 0.1, 1> } box { <-0.1, 0.1, -0.1>, <0.1, 6.0, 0.1> } // prateleiras: #declare i = 0; #while (i < 4) #declare d = 2; #declare prateleira = cylinder { <0, d+i, 0>, <0, d+i+0.1, 0> d+i+0.5} object { prateleira } #declare i = i + 1; //#declare d = d + 0.5; #end pigment { rgb <1.0, 0.0, 0.0> } } // Aqui está a cena, finalmente: object { plano } object { estante1 rotate <0,45,0> translate <-4,0,0> } object { estante2 rotate <0,45,0> translate <4,0,0> }