// Last edited on 2019-07-15 23:42:55 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_peca = texture{ pigment{ color rgb < 0.5, 0.5, 0.5 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.0, 0.0, 0.0 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 1.0 } #include "eixos.inc" #declare raio = 5; #declare grossura = 1; #declare numero_bolas = 300; #declare tx = tx_fosca; #macro CordaCircular(raio, grossura, numero_bolas, tx) #declare i = 0; #while (i < numero_bolas) sphere{ , grossura texture {tx} } #declare i=i+1; #end #end #declare lado = 10; #declare n = 400; #declare grossura = 1; #declare tx = tx_fosca; #macro CordaQuadrada(grossura, lado, n, tx) #declare i = 0; #declare tt = 0; #while (i < n) #if ((tt >= 0) & (tt < 1/4)) #declare centro = ; #end #if ((tt >= 1/4) & (tt < 1/2)) #declare centro = <0,0,cos(2*pi*i/n)>; #end #if ((tt >= 1/2) & (tt < 3/4)) #declare centro = ; #end #if ((tt >= 3/4) & (tt < 1)) #declare centro = <1,0,cos(2*pi*i/n)-1>; #end #declare i=i+1; #declare tt=tt+1/n; sphere{ lado*centro, grossura texture {tx} } #end #end #declare lado = 40; #declare n = 400; #declare grossura = 1; #declare tx = tx_fosca; #macro Corda(grossura, lado, n, tx) #declare i = 0; #declare tt = 0; #while (i < n) #if ((i/n >= 0) & (i/n < 1/8)) #declare centro = <0,0,i/n>; #end #if ((i/n >= 1/8) & (i/n < 1/4)) #declare centro = <((cos(pi*((i/n)-1/8)*4))*1/8)-1/8,0,((sin(pi*((i/n)-1/8)*4))*1/8)+1/8>; #end #if ((i/n >= 1/4) & (i/n < 1/2)) #declare centro = <((cos(pi*((i/n)-1/8)*4))*1/8)-1/8,0,((sin(pi*((i/n)-1/8)*4))*1/8)+1/4+1/8>; #end #declare i=i+1; sphere{ lado*centro, grossura texture {tx} } #end #end Corda(grossura, lado, n, tx) #include "camlight.inc" #declare centro_cena = < -4, 0, 10 >; #declare raio_cena = 25; #declare dir_camera = < 10.00, 30.00, 5.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)