// Exemplo de arquivo de descricao de cena para POV-ray // Fabio Massanori Sendo // 09 Junho 2001 // Last edited on 2001-07-30 16:20:23 by stolfi background{ color rgb < 0, 0, 1> } #include "colors.inc" camera { location <0,0,8> look_at <0,0,0> } light_source { <30,20,100> color 1.5*White } #declare tinta_Azul = texture { pigment { color rgb < 0, 0, 1 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Verde = texture { pigment { color rgb < 0, 1, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Vermelho = texture { pigment { color rgb < 1, 0, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } // Os tres cilindros e somente para mostrar os eixos das coordenada #declare cilindroX = cylinder { < -3, 0, 0 >, < 3, 0, 0 >, 0.01 texture { tinta_Vermelho } } #declare cilindroY = cylinder { < 0,-3, 0 >, < 0, 3, 0 >, 0.01 texture { tinta_Azul } } #declare cilindroZ = cylinder { < 0, 0, -3 >, < 0, 0, 3 >, 0.01 texture { tinta_Verde} } #declare rnd = seed(7860); #declare gomo = difference { sphere{<0,0,0>, 1 } union{ box{<2,2,2>, <0,-2,-2> } box{<2,2,2>, <0,-2,-2> rotate 135*z } } } #declare pirulito = union{ object{ gomo pigment { color rgb < 1, 0, 0 >}} object{ gomo pigment { color rgb < 0, 1, 0 >} rotate 45*z } object{ gomo pigment { color rgb < 0, 0, 1 >} rotate 90*z } object{ gomo pigment { color rgb < 1, 1, 0 >} rotate 135*z } object{ gomo pigment { color rgb < 1, 0, 0 >} rotate 180*z } object{ gomo pigment { color rgb < 0, 1, 0 >} rotate 225*z } object{ gomo pigment { color rgb < 0, 0, 1 >} rotate 270*z } object{ gomo pigment { color rgb < 0, 1, 1 >} rotate 315*z } cylinder { < 0, -1, 0 >, < 0, -3, 0 >, 0.1 pigment { color rgb < 1, 1, 0*clock >} } } #declare paralelepipedo = box { <.1,.1,.1>, <-.1,-.1,-.1> pigment { color rgb < 1, 0.8, 0.8 > } } #declare pirulito_txt = text{ ttf "arial.ttf" "pirulito" 0.2, 0} #declare macnabiscoca_txt = text{ ttf "arial.ttf" "MacNabisCoca" 1, 0} #declare xxx = cylinder { < -4.0, 0, 0 >, < 3.2, 0, 0 >, 2 } union { // somente para mostrar os eixos cartesianos //object{ cilindroX} // eixo X (Red) //object{ cilindroY} // eixo Y (Blue) //object{ cilindroZ} // eixo Z (Green) object{ pirulito rotate < 0, 0, clock*360> translate < -(6.5*((2*clock)-.9)),sin(360*clock),0> } #if( (clock >.8) &(clock < 1) ) object{pirulito_txt rotate <180,0,180> translate <1.5,0,0> pigment { color rgb < 1,.8, .5 >}} #end #if(clock = 1) object{pirulito translate <0,2,0>} #end difference{ object{macnabiscoca_txt rotate <180,0,180> translate <3,-3, 0> pigment { color rgb < 1,.8, .5 >}} object{xxx translate <-7*clock,-3,0>} } #declare n = 0; #while(n<100) object{paralelepipedo translate <20*rand(rnd)-10,20*rand(rnd)-10,20*rand(rnd)-10>} #declare n=n+1; #end }