// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_red = texture{ pigment{ color rgb < 1.00, 0.0, 0.10 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_preto = texture{ pigment{ color rgb < 0.0, 0.0, 0.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare raioMaior = 2.000; #declare raioMenor = 1.300; #declare raioPneu = 0.500; // Partes da cena: #declare bolaMaior = sphere{ < 0,0,0 >, raioMaior } #declare bolaMenor = sphere{ < 0,0,0 >, raioMenor } #declare pneu = sphere{ < 0,0,0 >, raioPneu texture {tx_preto} } #declare escapamento = cylinder{ < 1,2.5,-1 >, < 1,3,-1 >, 0.1 texture {tx_preto} } #declare carro = union{ object{ bolaMaior texture{ tx_red } } object{ bolaMenor translate < 0,-2,-0.8 > texture{ tx_red } } object{ bolaMenor translate < 0,+2,-0.8 > texture{ tx_red } } } #declare janela = box{ <3,-1,0.8>, <-3, 1,1.5> texture{tx_preto} } #include "eixos.inc" // Aqui está a cena, finalmente: object{ eixos(3.00) } //carro difference{ object{ carro } object{ janela } } //escapamento difference{ object{escapamento} object{ carro } } //pneus object{ pneu translate < 1.5,-1.8,-1.25 > } object{ pneu translate < 1.5,+1.8,-1.25 > } object{ pneu translate < -1.5,-1.8,-1.25 > } object{ pneu translate < -1.5,+1.8,-1.25 > } //janela intersection{ object{ bolaMaior } object{ janela } texture{ tx_vidro} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 6.0; #declare dir_camera = < 10.00, 1.00, 4.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)