// Last edited on 2003-06-28 14:05:12 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 10 #include "colors.inc" #include "textures.inc" background{ color rgb < 1.00, 1.00, 1.00 > } #declare cam = < 5, 7.0, 25 >; #declare ctr = < 0, 0.7, 0 >; camera { angle 15 location ctr + 0.9*(3 - 1.5*clock)*cam right +1.2*x up +0.9*y sky y look_at ctr } light_source { ctr + 100*vrotate(cam + 16.0*y, -40*y) color 1.2*White } light_source { ctr + 100*vrotate(cam + 3.0*y, +55*y) color 0.5*White } light_source { ctr + 100*vrotate(cam + 0.5*y, +15*y) color 0.8*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 rebimboca = cylinder { <0, -1.8, 0>, #if (clock > 0.5) #if (clock < 0.6) <0, -1.0 + ((-1.6 + 1.0)/(0.6-0.5))*(clock - 0.5) , 0>, #else <0, -1.6 , 0>, #end #else <0, -1.0, 0>, #end 0.2 translate<1.5, 0, 1.5> texture{Jade} } #declare base = union { cylinder { <0, -2.0, 0>, <0, -1.7, 0>, 2.5 texture {espelho_laranja} } object{rebimboca} } #declare mancal_basculante_inferior = torus { 1.2 0.2 rotate x*90 translate<0,-0.9,0> texture{cristal} interior {ior 1.5} } #declare acendedor = lathe { linear_spline 09, <0,10>, <1,7>, <1,3.0>, <2,1>, <1,-1>, <1,-5>, <2,-7>, <1, -9>, <1, -13> //, <3, -17>, <3, - 19> texture{Silver_Metal} finish { ambient .3 phong .75 } } #declare bloco_rotativo = union{ cylinder { <0, -0.3, 0>, <0, 2, 0>, 1.5 pigment{checker Green, color 0.7*Green scale <10,0.5,10> } } object{acendedor scale<0.1,0.1,0.1> #if (clock < 0.5) translate<(10*(clock - 0.5))+0.5, (-8*(clock - 0.5))+3, 1> #else translate<0.5, 3, 1> #end } } #declare chao = plane { y, -2.0 pigment { checker color White, color Gray } } #declare objeto = union { object{chao} object{base #if (clock < 0.5) translate<-10*(clock - 0.5), 0, 0> #end } object{mancal_basculante_inferior #if (clock < 0.5) translate<-10*(clock - 0.5), -10*(clock - 0.5), 0> #end } object{bloco_rotativo #if (clock < 0.5) translate<10*(clock - 0.5), 0, 0> #else rotate<0,0, 10*cos(4*pi*clock - pi/2)> #end } } union{ object{objeto #if (clock > 0.5) rotate<0,720*clock ,0> #end } //somente para mostrar os eixos cartesianos //object{eixoX} // eixo X (Red) //object{eixoY} // eixo Y (Blue) //object{eixoZ} // eixo Z (Green) }