// ====================================================================== // LABORATÓRIO 02 - COMPUTAÇÃO GRÁFICA // A COROA DE ARQUIMEDES // RAFAEL LAMARE SILVEIRA 009669 // ====================================================================== #include "colors.inc" // ====================================================================== // CÂMERA camera { location < 15.00, 8.00, -5.00 > // Posição do observador. right -0.75*x // Largura RELATIVA da imagem. up 1.00*y // Altura RELATIVA da imagem. sky y // Qual direção é "para cima"? look_at < 2.00, 6.00, -1.00 > // Para onde a câmera está apontando. } // ====================================================================== // FONTES DE LUZ light_source { 10 * < +50.0, +30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } background{ color rgb < 0.75, 0.80, 0.85 > } // ====================================================================== // PIGMENTOS E TEXTURAS #declare tx_cristal = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color rgb <0.5, 0.5, 1.0> filter 1 } } #declare tx_cristal2 = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 metallic } pigment { color rgb Gray40 filter 1} } #declare cor_espelho = <1.0, 1.0, 0.3> ; #declare tx_espelho = texture { pigment { rgb White } finish { ambient 0.05 diffuse 0.05 reflection cor_espelho specular 0.20 roughness 0.05 metallic } } // ====================================================================== // OBJETOS #declare base = torus { 4, 1 // major and minor radius texture { tx_cristal2 } interior { ior 1.5 } } #declare torno = lathe { linear_spline 4, <0,0>, <4,0>, <4,4>, <0,7> texture { tx_espelho } } #declare esferona = sphere { < 0.00, 7.50, 0.00 >, 1.00 texture { tx_cristal } interior { ior 2.5 } } #declare esferinha1 = sphere { < 3.50, 5.00, 0.00 >, 0.50 texture { tx_cristal } interior { ior 2.5 } } #declare esferinha2 = sphere { < -3.50, 5.00, 0.00 >, 0.50 texture { tx_cristal } interior { ior 2.5 } } #declare esferinha3 = sphere { < 0.00, 5.00, 3.50 >, 0.50 texture { tx_cristal } interior { ior 2.5 } } #declare esferinha4 = sphere { < 0.00, 5.00, -3.50 >, 0.50 texture { tx_cristal } interior { ior 2.5 } } #declare chao = plane { y, 0 texture { pigment { checker Black White } finish { ambient 0.1 diffuse 0.9 } scale 2.0 } } #declare coroa = difference { union { object { base } object { esferona } object { torno } object { esferinha1 } object { esferinha2 } object { esferinha3 } object { esferinha4 } } } // ====================================================================== // FORMA FINAL difference { union { object { coroa translate y*2 } object { chao } } }