#include "colors.inc" background{ color rgb<1,1,1> } // ====================================================================== // FONTES DE LUZ light_source { 10 * < +50.0, +30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < 4.0, 10.0, 30.0 > // Posição da lâmpada. color rgb < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== camera { location < 4.00, 4.00, 20.00 > right < -0.60, 0.00, 0.00 > up < 0.00, 0.00, 0.80 > sky < 0.00, 0.00, 1.00 > look_at < 4.00, 4.00, 0.00 > } //eixos #declare eixox = cylinder { < -5.00, 0.00, 0.00 >, < 5.00, 0.00, 0.00 >, 0.05 pigment { color Black } } #declare eixoy = cylinder { < 00, -5.00, 0.00 >, < 00, 5.00, 0.00 >, 0.05 pigment { color Black } } #declare eixoz = cylinder { < 0.0, 00, -5.00 >, < 0.0, 00, 5.00 >, 0.05 pigment { color Black } } #declare fonte=seed(123456); #declare host = sphere { < 0, 0, 0 >,0.5 pigment{color Black} } #declare enlace = cylinder { < 0.0, -2.0, 0.00 >, < 0.0, 2.0, 0.00 >, 0.1 pigment{color Yellow} } #declare i=0; #declare j=0; #while (j < 3) #while (i < 3) object { host translate 4*i*y translate 4*j*x} #declare k=0; #while (k <3) #if(j < 2) #if(i < 2) object { enlace translate <0,2,0> translate 4*i*y translate 4*k*x pigment { color Yellow } } object {enlace rotate z*90 translate <2,0,0> translate 4*j*x translate 4*k*y} #end #end #declare k=k+1; #end #declare i=i+1; #end #declare i=0; #declare j=j+1; #end #declare pacote = box{ <-0.5,-0.50,0> <0.5,0.5,0.3> } //caminho #declare h=0; #while(h<3) #declare p=0; #declare c=0; #declare l=0; #declare r = rand(fonte); #while(p<3) #if(r>0.5) object{pacote pigment{color rgb} translate r*7.5*x} object{pacote pigment{color rgb} translate <8,0,0> translate (r-0.5)*7.5*y} #if(r>0.75) object{pacote pigment{color rgb} translate <8,0,0> translate r*7.5*y} #else object{pacote pigment{color rgb} translate <0,4,0> translate r*8*x} #end #else object{pacote pigment{color rgb} translate r*7.5*x} object{pacote pigment{color rgb} translate <4,0,0> translate r*7.5*y} #if(r>0.25) object{pacote pigment{color rgb} translate <4,0,0> translate (r+0.5)*7.5*y} #else object{pacote pigment{color rgb} translate <0,4,0> translate r*8*x} #end #end #declare p=p+1; #end #declare h=h+1; #end // Aqui está a cena, finalmente: union { //object{eixox} //object{eixoy} //object{eixoz} }