// Last edited on 2003-04-13 23:09:00 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 06 #include "colors.inc" #include "textures.inc" background{Green} #declare ctr = <0, 0, 0>; #declare cam = <0, 5, 25>; camera { location ctr + 0.4*cam right -1.2*x up 0.9*y sky y look_at ctr } light_source { ctr + 10*(vrotate(cam, 20*y) + 10*y) color 1.1*White } light_source { ctr + 10*(vrotate(cam, -70*y) + 10*y) color 0.5*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.1 diffuse 0.1 reflection 0.35 specular 1 roughness 0.001 } } #declare vermelho_transp = texture { pigment { Red filter 1} finish { ambient 0.1 diffuse 0.1 reflection 0.35 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 texture {espelho_laranja} } cylinder { <0, -1.9, 0>, <0, -1.5, 0>, 0.5 translate<1, 0, 1> } } #declare majorRadius = 2.0; #declare minorRadius = 0.5; #declare majorRadius2 = majorRadius - 2*minorRadius; #declare initialPosition = -8; #declare rotacao = (5*360*clock*0.5); #declare posicao = (initialPosition - initialPosition*clock); #declare torus1 = difference { torus { majorRadius minorRadius rotate x*90 translate texture{pigment{Yellow}} } } #declare torus2 = difference { torus { majorRadius2 minorRadius rotate x*rotacao translate texture{pigment{Red}} } } #declare a = -3; #declare b = 3; #declare superiorplane = (a + ((b - a)/(0.875 - 0.375)) * ((clock - 0.375)/(0.875 - 0.375))); #declare inferiorplane = (a + ((b - a)/(0.875 - 0.750)) * ((clock - 0.750)/(0.875 - 0.750))); #declare senhordos = union { difference{ text{ ttf "arial.ttf" "O Senhor Dos" 0.15, 0 translate<-3,3,0> } plane {-x, -superiorplane} } difference{ text{ ttf "arial.ttf" "TOROIDES" 0.15, 0 translate<-2.5,-3.5,0> } plane {-x, -inferiorplane} } pigment { Magenta } // estava faltando - acrescentado por stolfi } #declare chao = plane { y, -2.0 pigment { checker color White, color Gray } } union { //object{chao} object{torus1} object{torus2} object{senhordos} //somente para mostrar os eixos cartesianos object{eixoX} // eixo X (Red) object{eixoY} // eixo Y (Blue) object{eixoZ} // eixo Z (Green) }