// Last edited on 2009-07-23 13:40:00 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.000; #declare tinta_A = texture { pigment { color rgb < 1.00, 0.00, 0.00 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare tinta_AA = texture { pigment { color rgb < 0.50, 0.50, 0.50 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 0.00, 1.00, 0.00 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare tinta_C = texture { pigment { color rgb < 0.30, 0.30, 0.30 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare tinta_D = texture { pigment { color rgb < 1.00, 1.00, 1.00 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare Carta = box { < 0.00, 0.00, 0.00 >, < 0.010, 1.00, 2.00 > pigment { image_map {png "verso.png"} scale <2,1,2> rotate <0,90,0> } } #declare duasCartasSemTeto = union { object {Carta rotate <0,-20,0> translate <0.68,0,0>} object {Carta rotate <0,20,0> translate <-0.68,0,0>} } #declare duasCartasComTeto = union { object {Carta rotate <0,-20,0> translate <0.68,0,0>} object {Carta rotate <0,20,0> translate <-0.68,0,0>} object {Carta rotate <0,90,0> translate <-0.0,0,1.9>} } #declare QuatroCartasComTeto = union { object {Carta rotate <0,0,90> translate < 0.5,-1.0,0>} object {Carta rotate <0,0,-90> translate <-0.5, 0,0>} object {Carta rotate <0,0,180> translate < 0.5, 0,0>} object {Carta rotate <0,0,-180> translate <-0.5,0,-0.5>} } #declare QuatroCartasSemTeto = union { object {Carta rotate <0,0,90> translate < 0.5,-1.0,0>} object {Carta rotate <0,0,-90> translate <-0.5, 0,0>} object {Carta rotate <0,0,180> translate < 0.5, 0,0>} object {Carta rotate <0,0,-180> translate <-0.5,0,-0.5>} } #macro Castelo(n) #if (n = 0) object { duasCartasSemTeto } #else #declare i = n; #while (i > 0) #declare j = n-i; #while (j > 0) #if (j > 1) object {duasCartasComTeto translate <2*(n-j)-((2*(i))/2),0,(i-1)*1.9>} #else object {duasCartasSemTeto translate <2*(n-j)-((2*(i))/2),0,(i-1)*1.9>} #end #declare j = j-1; #end #declare i = i-1; #end #end #end #macro Torre(n,xx,yy,zz) #if (n = 0) object { object {QuatroCartasSemTeto translate <0+xx,0+yy,1.01+zz>} } #else #declare j = n; #while (j > 0) #if (j > 1) object {QuatroCartasComTeto translate <0+xx,0+yy,j*1.01+zz>} #else object {QuatroCartasSemTeto translate <0+xx,0+yy,j*1.01+zz>} #end #declare j = j-1; #end #end #end #macro Muro(n,xx,yy,zz) #if (n = 0) object { object {QuatroCartasSemTeto translate <0+xx,0+yy,1.01+zz>} } #else #declare j = n; #while (j > 0) #if ( j != n/2 ) #if ( j != n/2+1 ) #if ( j != n/2-1 ) object {QuatroCartasComTeto translate } #end #end #end object {QuatroCartasComTeto translate } object {QuatroCartasComTeto translate } object {QuatroCartasComTeto translate } #declare j = j-1; #end #end #end #macro Chao(n) cylinder { < n, n, -2.50 >, < n, n, 0.00 >, 3*n texture { pigment{ color rgb < 0.2,0.7,0.2 > } finish { roughness 0.06 diffuse 0.4 ambient 0.6 } } } cylinder { < n, n, -2.50 >, < n, n, -0.50 >, 9.9*n texture { pigment{ color rgb < 0.2,0.4,0.9 > } finish { roughness 0.06 diffuse 0.4 ambient 0.6 } } } difference{ cylinder { < n, n, -2.50 >, < n, n, 0.00 >, 10*n texture { pigment{ color rgb < 0.2,0.7,0.2 > } finish { roughness 0.06 diffuse 0.4 ambient 0.6} } } cylinder { < n, n, -2.50 >, < n, n, 0.10 >, 4*n texture { pigment{ color rgb < 0.2,0.7,0.2 > } finish { roughness 0.06 diffuse 0.4 ambient 0.6} } } } #end #macro Citadela(n) Castelo(n) Torre (2*n, 3*n, -n,0) Torre (2*n, -n, 3*n,0) Torre (2*n, -n, -n,0) Torre (2*n, 3*n, 3*n,0) Muro(4*n,-n,-n,0) Chao(n) #end #declare N = 6; union { Citadela(N) } // Original camera parameters: // #local cam_ctr = <5.00,10.00,0.00> // #local cam_vec = (<15.00,-30.00,20.00>-<5.00,10.00,0.00>) // #local cam_sky = z #include "camlight.inc" camlight(,<-10,6,5>,2+10*N,z,1.0)