// CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_1 = texture{ pigment{ color rgb < 0.92, 0.51, 0.23 >} finish{ diffuse 0.7 ambient 0 specular 0.5 roughness 0.9 } } #declare tx_2 = texture{ pigment{ color rgb < 0.5, 0.5, 0.50 > } finish{ diffuse 0.2 reflection 0.2 ambient 0.1 } } #declare tx_prata = texture{ pigment{ color rgb < 0.3, 0.3, 0.3 > } finish{ diffuse 0.2 reflection 0.6 brilliance 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02} } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.5, 0.44, 0.98 >, color rgb < 0.00, 0.86, 0.29 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } //MACROS #macro garra(angulo) union{ object{cilindro_grande} object{cilindro_pequeno rotate <120,0,0> } object{cilindro_pequeno rotate <0,120,0> } object{cilindro_pequeno rotate <0,-120,0> } object{cilindro_pequeno rotate <-120,0,0> } object{cilindro_pequeno rotate translate <0,-2.5,-1.4> } object{cilindro_pequeno rotate <0,angulo,0> translate <2.5,0,-1.4> } object{cilindro_pequeno rotate <0,-angulo,0> translate <-2.5,0,-1.4> } object{cilindro_pequeno rotate <-angulo,0,0> translate <0,2.5,-1.4> } } #end // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare raio = 1; #declare bandeija = box{ <-15,-10,0>, <15,10,1> texture{tx_prata} } #declare alca = torus{ 2*raio, 0.3*raio texture{tx_prata} } #declare cilindro_grande = cylinder{ < 0,0,0 >, <0,0,3>, 0.5*raio texture{tx_2} } #declare cilindro_pequeno = cylinder{ <0,0,0>, <0,0,3>, 0.3*raio texture{tx_2} } #declare biscoito = torus{ 2*raio,raio} #include "eixos.inc" union{ object{bandeija} difference{ object{alca} object{ box{ <0,0,0>, <-2,-2,-2>} } rotate<0,0,90> translate <-14,0,0> } difference{ object{alca} object{ box{ <0,0,0>, <-2,-2,-2>} } rotate<0,0,90> translate <14,0,0> } } object{biscoito rotate <90,0,0> translate<0,0,2> texture {tx_1} } object{garra(130) translate <-10,0,15> } object{garra(150) translate <0,0,15> } object{garra(180) translate <10,0,15> } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 20; #declare dir_camera = < -1, 2, 4 >; #declare dist_camera = 100; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)