// Last edited on 2019-07-17 01:36:11 by stolfilocal // Processed by remove-cam-lights #declare tx_fosca = texture{ pigment{ color rgb < 1.000, 0.900, 0.800 > } finish{ diffuse 0.9 ambient 0.1 } } #include "eixos.inc" #macro interpolalin(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 = interpolalin(t0,a,t1,b,tt); #local bc = interlocalin(t0,b,t1,c,tt); #local cd = interpolalin(t0,c,t1,d,tt); #local abc = interpolalin(t0,ab,t1,bc,tt); #local bcd = interpolalin(t0,bc,t1,cd,tt); #local abcd = interpolalin(t0,abc,t1,bcd,tt); abcd #end #macro cria_quadrado(r, n) union{ #local alfa = 0; #local delta = 2*pi/n; #local p0 = <1, sin(pi/4),0>; #local p1 = <1, sin(7*pi/4),0>; #local p2 = ; #local p3 = ; #local p4 = <-1,sin(5*pi/4),0>; #local p5 = <-1,sin(3*pi/4),0>; #local p6 = ; #local p7 = ; #local ctr = <0,0,0>; #while(alfa <= 2*pi) #if(alfa <= pi/4 & alfa > 7*pi/4) #local ctr = interpolalin(pi/4, p0, 7*pi/4, p1, alfa); #end #if(alfa <= 3*pi/4 & alfa > pi/4) #local ctr = interpolalin(3*pi/4, p2, pi/4, p3 ,alfa); #end #if(alfa <= 5*pi/4 & alfa > 3*pi/4) #local ctr = interpolalin(5*pi/4, p4, 3*pi/4, p5, alfa); #end #if(alfa <= 7*pi/4 & alfa > 5*pi/4) #local ctr = interpolalin(7*pi/4, p6, 5*pi/4, p7, alfa); #end sphere{ ctr, r texture{tx_fosca} } #local alfa = alfa + delta; #end } #end object{cria_quadrado(0.1, 100)} #include "camlight.inc" #declare centro_cena = < 0,0,0>; #declare raio_cena = 2.5; #declare dir_camera = < 0,2,4 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)