// Exercicio 3 de laboratorio - 19/10/2000 // Marilia Goulart Honorio - 971259 #include "colors.inc" background{ color rgb < 1, 1, 1 > } light_source { < 0.00, 10.00, 8.00 > color rgb < 1.00, 1.00, 1.00 > } camera { location < 0.00, 6.00, 2.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_A = texture { pigment { color rgb < 0.10, 0.80, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 1.00, 0.80, 0.10 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare bola = sphere { < 0.00, 0.00, 0.00 >, 2.00 texture { tinta_A } } #declare furo1 = cylinder { < -2.00, -2.00, -2.00 >, < +2.00, +2.00, +2.00 >, 0.75 texture { tinta_B } } #declare fruta = blob { threshold .65 cylinder { <-.75,-.75,0>, <.75,.75,0>, .5, 1 } pigment { Blue } //finish { phong 1 } texture {tinta_A} } #declare fruta2 = blob { threshold .65 sphere { <2.5,0,0>, 1.5, 1 pigment { Red } } sphere { <0,0,0>,3.5, 1 pigment { Red } } sphere { <-2.5,0,0>,1.5, 1 pigment { Red } } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare fruta3 = blob { threshold .60 sphere { <2.5,0,0>, 1.5, 1 pigment { White } } sphere { <0,0,0>,3.5, 1 pigment { White } } sphere { <-2.5,0,0>,1.5, 1 pigment { White } } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare caixa = box { <6,2,0>, <-6,0,2> //texture { pigment { color rgbt <1,1,1,1> } } texture { pigment { Red } } } #declare recheio1 = blob{ threshold .65 sphere { <0,0,0>, 2.5, 1 texture { pigment { color Yellow } normal { bumps 0.4 scale 0.2 } } finish { phong 1} } } #declare recheio2 = blob{ threshold .65 sphere { <2,0,0>, 1.5, 1 texture { pigment { color Green } } //normal { bumps 0.4 scale 0.2 } } finish { phong 1} } } #declare recheio3 = blob{ threshold .65 sphere { <-2,0,0>, 1.5, 1 texture { pigment { color Green } normal { bumps 0.8 scale 0.2 } } finish { phong 1} }// Aqui está a cena, finalmente: } difference{ difference{ object { fruta2 } object { recheio1 } object { recheio2 } object { recheio3 } } object { caixa } } //object {recheio1} //object {recheio2} //object {recheio3}