// Last edited on 2019-07-15 23:57:17 by stolfilocal // Processed by remove-cam-lights #declare tx_fosca = texture{ pigment{ color rgb < 1, 1, 0.9 > } finish{ diffuse 0.9 ambient 0.1 } } #include "eixos.inc" #macro cria_circulo(r, n) #declare i = 0; union{ #while(i r texture{tx_fosca}} #declare i = i + 1; #end } #end #macro cria_quadrado(r, n) union{ #declare alfa = -pi/4; #declare delta = 2*pi/n; #while(alfa < 7*pi/4) #if((alfa > -pi/4) & (alfa <= pi/4)) sphere{<1, tan(alfa), 0>, r texture{tx_fosca}} #end #if((alfa > pi/4) & (alfa <= 3*pi/4)) sphere{<1/tan(alfa), 1, 0>, r texture{tx_fosca}} #end #if((alfa > 3*pi/4) & (alfa <= 5*pi/4)) sphere{<-1, -tan(alfa), 0>, r texture{tx_fosca}} #end #if((alfa > 5*pi/4) & (alfa <= 7*pi/4)) sphere{<-1/tan(alfa), -1, 0>, r texture{tx_fosca}} #end #declare alfa = alfa + delta; #end } #end object{cria_quadrado(0.1, 100)} object{cria_circulo(0.1,100)} #include "camlight.inc" #declare centro_cena = < 0,0,0>; #declare raio_cena = 2.7; #declare dir_camera = < 0,2,4 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.10; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)