//Tp03 by Carlos Robson // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare Yellow = rgb<255, 255, 0>; #declare Black = rgb < 0.4, 0.4, 0.4 >; #declare camara = sphere { < 0, 0, 0>, 1 // Near lower left corner pigment {Yellow} } #declare tunel = cylinder { <2, 0, 0>, // Center of one end <2, 2, 0>, // Center of other end 0.5 //radius pigment {Black} } // ====================================================================== // DESCRIÇÃO DA CENA #include "eixos.inc" object{ eixos(3.00) } //object{ camara } //object{ tunel } //object{ camara translate<+3, 0, 0>} #declare roleta1 = seed(2); #macro tunelar(n) #declare centroVetor = array[n]; union{ #declare i = 0; #while(i; object{ camara translate centroVetor[i] scale int(rand(roleta1)+1)} #declare i=i+1; #end //Entrada do tunel object{ cylinder { centroVetor[0], // Center of one end 0.5 //radius pigment {Black} } } #declare j = 1; #while(j<(n-1)) object{ cylinder { centroVetor[j], // Center of one end centroVetor[j+1], // Center of other end 0.5 //radius pigment {Black} } } #declare j=j+1; #end } #end object{tunelar(10)} #include "camlight.inc" #declare centro_cena = < 50.00, 50.00, 50.00 >; #declare raio_cena = 100.0; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)