// Exercicio 3 da 4a. aula de Laboratorio - MC930 - Prof. Stolfi // Eduardo C. Lazarine - RA 970561 background{ color rgb < 1.00, 1.00, 1.00 > } light_source { < 10.00, 20.00, 10.00 > color rgb < 1.00, 1.00, 1.00 > } camera { location < 0.00, 10.00, -10 > // right < 2.40, 0.00, 0.00 > // up < 0.00, 0.00, 1.80 > // sky < 0.00, 0.00, 1.00 > look_at < 0.00, 0.00, 0.00 > } #declare raio1 = 0.800; #declare raio2 = 0.200; #declare raio3 = 0.100; //declaracao dos componentes do cereal #declare flor = union { blob { threshold .3 sphere {<.8,0,0>, raio1, 1 pigment {color rgb <1,1,0>}} sphere {<-.8,0,0>, raio1, 1 pigment {color rgb <1,1,0>}} cylinder{<.8,0,0>,<-.8,0,0>, raio2, 1 pigment{color rgb <1,1,0>} } finish {phong 1} } blob { threshold .3 sphere {<0,.8,0>, raio1, 1 pigment {color rgb <1,1,0>}} sphere {<0,-.8,0>, raio1, 1 pigment {color rgb <1,1,0>}} cylinder{<0,.8,0>,<0,-.8,0>,raio2, 1 pigment{color rgb <1,1,0>} } finish {phong 1} } } #declare caule = cylinder{<0,0,-5> <0,0,4.5> raio3 pigment{color rgb <0,1,0>} } //-----------------------------Montando e mostrando o cereal object {flor } object {flor translate <0,0,1.5>} object {flor translate <0,0,3>} object {flor translate <0,0,-1.5>} object {caule }