//Last edited on 2003-04-12 02:21:48 by stolfi //Universidade Estadual de Campinas //Instituto de Computação //Aluno: Ricardo Capitanio Martins da Silva //RA: 992386 Disciplina: MC930A //Professor: Stolfi //Trabalho Prático 04 #include "colors.inc" #include "textures.inc" background{ color rgb < 1.00, 1.00, 1.00 > } #declare ctr = <0,0,0>; #declare vis = <5,0,15>; #declare cam = vis + 8*y; camera { location ctr + 0.5*cam right <0.60, 0.0, 0.00> up <0.00, 0.00, 0.80> sky <0.00, 1.00, 0.00> look_at ctr } light_source { ctr + 20*(vrotate(vis, 90*y) + 30*y) color 1.0*White } light_source { ctr + 20*(vrotate(vis, -20*y) + 1*y) color 0.3*White } // Eixos de coordenadas #declare eixoX = cylinder { < -3, 0, 0 >, < 3, 0, 0 >, 0.01 texture {pigment{Red}} } #declare eixoY = cylinder { < 0,-3, 0 >, < 0, 3, 0 >, 0.01 texture { pigment{Blue} } } #declare eixoZ = cylinder { < 0, 0, -3 >, < 0, 0, 3 >, 0.01 texture {pigment{Green}} } #declare corpo_metalico = texture { pigment { Brown } finish { Metallic_Finish reflection .09} } #declare amarelo_transp = texture { pigment { Yellow filter 1} finish { ambient 0.05 diffuse 0.1 reflection 0.15 specular 1 roughness 0.001 } } #declare vermelho_transp = texture { pigment { Red filter 1} finish { ambient 0.05 diffuse 0.1 reflection 0.15 specular 1 roughness 0.001 } } #declare cristal = texture { pigment {White filter 1} finish { ambient 0.1 diffuse 0.1 reflection 0.35 specular 1 roughness 0.001 } } #declare espelho_laranja = texture { pigment {Orange} finish { ambient 0.05 diffuse 0.05 reflection Orange specular 0.2 roughness 0.05 } } #declare base = difference { cylinder { <0, -2.0, 0>, <0, -1.7, 0>, 2.5 } cylinder { <0, -1.9, 0>, <0, -1.5, 0>, 0.5 translate<1, 0, 1> } texture {espelho_laranja} } declare meio_torus = difference { torus { 1.2 0.2 rotate x*90 translate<0,-0.9,0> texture{cristal} interior {ior 1.5} } box { <5, 5, 1>, <-5, -0.3, -1> } } declare torus1 = difference { torus { 1.5 0.4 rotate x*90 translate<0,1.2,0> texture{amarelo_transp} interior {ior 1.5} } } declare torus2 = difference { torus { 1.1 0.4 translate<0,1.2,0> texture{vermelho_transp} interior {ior 1.5} } } declare chao = plane { y, -2.0 pigment { checker color White, color Gray } } union { object{chao} object{base} object{meio_torus} object{torus1} object{torus2} //somente para mostrar os eixos cartesianos //object{eixoX} // eixo X (Red) //object{eixoY} // eixo Y (Blue) //object{eixoZ} // eixo Z (Green) }