// 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.80, 0.80, 0.80> } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #include "eixos.inc" #include "colors.inc" #macro chao(altura) plane { z, altura pigment { checker color rgb <0.4, 0.4, 0.4> color rgb <0.6, 0.6, 0.6> scale 6} finish { reflection 0.2 ambient 0.9 diffuse 0.1 } } #end #macro pivot(raio) union { // Pivot sphere { <0, 0, 0>, raio pigment { color rgb <0.4, 0.4, 0.4> } finish { reflection 0.2 phong 0.4 } } // Pino do pivot intersection { cylinder { <-raio - 0.01, 0, 0>, , raio / 3 pigment { color rgb <1, 1, 1> } } sphere { <0, 0, 0>, raio + 0.01 pigment { color rgb <0, 0, 0> } } } } #end #macro braco(tamanho, abertura, raio_pa) union { // Braco da pinca cylinder { <0, 0, 0>, <0, tamanho, 0>, 0.3 texture { pigment { color rgb <0.3, 0.3, 0.9> } finish { reflection 0.2 phong 0.9 } } } // Pa que fica na ponta do braco da pinca cylinder { <0, tamanho + (raio_pa / 2), -0.01>, <0, tamanho + (raio_pa / 2), 0.01>, raio_pa texture { pigment { color rgb <0.6, 0.2, 0.3, 0.8> } finish { reflection 0.5 phong 0.4 diffuse 0.7 } } } rotate } #end #macro pinca(raio_pivot, tamanho_braco, abertura_braco, raio_pa) union { object { pivot(raio_pivot) } object { braco(tamanho_braco, -abertura_braco / 2, raio_pa) } object { braco(tamanho_braco, abertura_braco / 2, raio_pa) } } #end #macro biscoito(R, r) object { torus { R, r } pigment { color rgb <0.7, 0.7, 0> } rotate <90, 0, 0> } #end #macro biscoito_recheado(R, r) union { // Biscoito object { biscoito(R, r) } // Recheio do biscoito object { sphere { <0, 0, 0> R-r pigment { color rgb <0.9, 0.6, 0.6> } } } } #end // Aqui está a cena, finalmente: union { object { chao(-15) } object { pinca(1.5, 15, 5, 1.5) translate <-10, 0, 0> } object { pinca(1.5, 15, 15, 1.5) translate <0, 0, 0> } object { pinca(1.5, 15, 60, 1.5) translate <10, 0, 0> } object { biscoito(1, 0.5) translate <0, 17, 1.2> } object { biscoito_recheado(1, 0.5) translate <10, 17, 2.2> } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 50.0; #declare dir_camera = < 3.00, 10.00, 7.00 >; #declare dist_camera = 30.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)