// Terceiro Exercicio de MC930 // Editado em 19/10 // Fabio Yuasa Niizu RA:962325 background{ color rgb < 1,1, 1 > } light_source { < 5.00, -20.00, 5.00 > color rgb < 1.00, 1.00, 1.00 > } camera { location < 5.00, -14.00, 5.00 > right < -1.20, 0.00, 0.00 > up < 0.00, 0.00, 0.90 > sky < 0.00, 0.00, 1.00 > look_at < 0.00, 0.00, 0.00 > } #declare raio = 2.000; #declare tinta_red = texture { pigment { color rgb < 1, 0, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_green = texture { pigment { color rgb < 0, 1, 0 > } normal { bumps 0.5 scale 0.50 } finish { phong 1 } } #declare tinta_roxo = texture { pigment { color rgb < 0.5, 0, 1 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare bolaSuperior = sphere { < 0, 0.00, 2.00 >, 2.00 texture { tinta_green } } #declare bolaInferior = sphere { < 0, 0.00, -2.00 >, 2.00 texture { tinta_green } } #declare cilindro = cylinder { < 0.00, 0.00, 2.00 >, < 0.00, 0.00, -2.00 >, 2.00 texture { tinta_green } } #declare Corte = box { < 0, -10, 0>, // Near lower left corner < 10, 10, 10> texture { tinta_red } } #declare bolaSuperior2 = sphere { < 0, 0.00, 2.00 >, 1.95 texture { tinta_red } } #declare bolaInferior2 = sphere { < 0, 0.00, -2.00 >, 1.95 texture { tinta_red } } #declare cilindro2 = cylinder { < 0.00, 0.00, 2.00 >, < 0.00, 0.00, -2.00 >, 1.95 texture { tinta_red } } #declare Corte2 = box { < 0.05, -10, 0.05>, // Near lower left corner < 10, 10, 10> texture { tinta_red } } #declare bolaSuperior3 = sphere { < 0, 0.00, 2.00 >, 1.5 texture { tinta_roxo } } #declare bolaInferior3 = sphere { < 0, 0.00, -2.00 >, 1.5 texture { tinta_roxo} } #declare cilindro3 = cylinder { < 0.00, 0.00, 2.00 >, < 0.00, 0.00, -2.00 >, 1.5 texture { tinta_roxo } } // Aqui está a cena, finalmente: difference { union { object { bolaSuperior } object { bolaInferior } object { cilindro } } Corte } difference { union { object { bolaSuperior2 } object { bolaInferior2 } object { cilindro2 } } Corte2 } union { object { bolaSuperior3 } object { bolaInferior3 } object { cilindro3 } }