// 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_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_plastico2 = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_assento = texture{ pigment{ color rgb < 1.00, 0, 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_enconsto = texture{ pigment{ color rgb < 0, 1, 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_campo = texture{ pigment{ color rgb < 0, 1, 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_branco = texture{ pigment{ color rgb < 1, 1, 1 > } finish{ diffuse 0.9 ambient 0.1 } } #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_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare cabeca = sphere{<1.5,1,6>,0.5 texture{tx_fosca}} #declare corpo = union{ cone{<1.5,1,4>,0.75 , <1.5,1,6>, 0.125 texture{tx_plastico}} object{cabeca} scale 0.6 } #declare assento = union{ box{<0,0,0>,<1,1,0.1> texture{tx_assento}} object{corpo translate<-0.5,0,-2>} } #macro escadas (ndegrau,largura) #declare i=0; union{ #while(i, } #declare i = i+1; #end } #end #macro secao (fileiras,assentos) #declare i=0; #declare j=0; union{ #while(i, texture{tx_fosca}} #declare j = 0; #while(j } #declare j = j+1; #end #declare i = i+1; #end } #end #declare trave = union{ cylinder { <0,0,0>,<0,4,0>,0.2 texture{tx_branco}} cylinder { <0,0,0>,<0,4,0>,0.2 rotate -90*x texture{tx_branco}} cylinder { <0,0,0>,<0,4,0>,0.2 rotate -90*x translate<0,4,0> texture{tx_branco}} } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ eixos(3.00) } object{ chao translate < 0,0,-5 > texture{ tx_campo } } object{ secao(5,8) translate <0,0,-5> } object{ secao(5,16) translate <0,-10,-5> } object{ escadas(5,3) translate <0,-2.5,-5> texture{ tx_fosca }} object{ secao(5,8) rotate 180*z translate <-8,0,-5> } object{ escadas(5,8) rotate 180*z translate <-8,-4,-5> texture{ tx_fosca }} object{ secao(5,16) translate <8,-10,-5> rotate 180*z } object{ escadas(5,3) translate <8,-2.5,-5> texture{ tx_fosca } rotate 180*z} object{ escadas(5,2) rotate -90*z translate <-3,-9,-5>texture{ tx_fosca }} object{ secao(5,15) rotate -90*z translate <-10,-9,-5>} object{ escadas(5,2) rotate 90*z translate <2,9,-5>texture{ tx_fosca }} object{ secao(5,15) rotate 90*z translate <0,9,-5>} object{ escadas(5,3) translate <0,2.5,-5> texture{ tx_fosca }} object{ secao(5,16) translate <0,5,-5> } object{trave rotate 90*z scale 0.8 translate<-3,9,-1.7>} object{trave rotate 90*z scale 0.8 translate<-3,-8,-1.7>} //object{assento} } #include "camlight.inc" #declare centro_cena = < -10.00, 10, 10.00 >; #declare raio_cena = 20.0; #declare dir_camera = < -400, 400, 300 >; #declare dist_camera = 30.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)