// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2017-05-07 20:10:09 by stolfilocal // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_cor00 = texture{ pigment{ color rgb < 0.30, 0.30, 0.30 > } finish{ diffuse 0.8 ambient 0.1 specular 1.0 roughness 0.005 } } #declare tx_cor01 = texture{ pigment{ color rgb < 1.00, 0.20, 0.20 > } finish{ diffuse 0.6 ambient 0.1 specular 1.0 roughness 0.005 } } #declare tx_cor02 = texture{ pigment{ color rgb < 0.00, 0.00, 0.00 > } finish{ diffuse 0.5 ambient 0.8 specular 1.0 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare rad = 0.2; // Partes da cena: #declare esfera = sphere{ < 0, 0, 0>, rad } #include "eixos.inc" #macro interpola (t0, v0, t1, v1, tt) #local r = (tt-t0)/(t1-t0); #local s = 1-r; #local vv = s*v0 + r*v1; vv #end #macro arcobezier (t0, t1, A, B , C, D, tt) #local AB = interpola (t0, A, t1, B, tt); #local BC = interpola (t0, B, t1, C, tt); #local CD = interpola (t0, C, t1, D, tt); #local ABC = interpola (t0, AB, t1, BC, tt); #local BCD = interpola (t0, BC, t1, CD, tt); #local ABCD = interpola (t0, ABC, t1, BCD, tt); ABCD #end #macro noh () union { #declare space = rad / 100; #declare i = 0; #while ( i < 8 ) # if (i < 1) object { esfera translate interpola(0, <0, 0, 0>, 1, <-2, 3, 0>, i) texture{ tx_cor00 } } #end #if ((i >= 1) & (i < 2)) object { esfera translate arcobezier (1, 2, <-2, 3, 0>, <-2, 4, -0.25> , <-2, 3.5, -0.75>, <-2, 3,-1>, i) texture{ tx_cor00 } } #end #if ((i >= 2) & (i < 3)) object { esfera translate interpola(2, <-2, 3,-1>, 3, <-2, 1.5, -1>, i) texture{ tx_cor00 } } #end #if ((i >= 3) & (i < 4)) object { esfera translate arcobezier (3, 4, <-2, 1.5, -1>, <-2, 1.2, -1.2>, <-2, 1.2, -1.2>, <-2, 1.3, -0.9>, i) texture{ tx_cor00 } } #end #if ((i >= 4) & (i < 5)) object { esfera translate interpola(4, <-2, 1.3, -0.9>, 5, <-2, 1.3, 1>, i) texture{ tx_cor00 } } #end #if ((i >= 5) & (i < 6)) object { esfera translate arcobezier (5, 6, <-2, 1.3, 1>, <-1, 1.3, 2>, <-0, 1.3, 2>, <0, 3, 1>, i) texture{ tx_cor00 } } #end #if ((i >= 6) & (i < 7)) object { esfera translate arcobezier (6, 7, <0, 3, 1>, <-1, 2.9, 0>, <-4, 1.5, -2>, <-3, 0, -1.4>, i) texture{ tx_cor00 } } #end #if (i >= 7) object { esfera translate interpola(7, <-3, 0, -1.4>, 8, <0,0,0>, i) texture{ tx_cor00 } } #end #declare i = i+space; #end } #end // Aqui está a cena, finalmente: object{ eixos(3.00) } noh () #include "camlight.inc" #declare centro_cena = < 9.00, 5.00, 3.00 >; #declare raio_cena = 5.0; #declare dir_camera = < 9.00, 5.00, 3.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)