// Crystal Castle by Carlos Camolesi 04/09/03 // ------------------------------------------- #include "colors.inc" background{ color rgb < 0.00, 0.00, 0.00 > } light_source { < 10.00, 0.00, 0.00 > color rgb < 1.00, 1.00, 1.00 > } light_source { < 0.00, 10.00, 10.00 > color rgb < 1.00, 1.00, 1.00 > } light_source { <10.00, 10.00, 10.00 > color rgb < 1.00, 1.00, 1.00 > } light_source { <0.00, 0.00, -10.00 > color rgb < 1.00, 1.00, 1.00 > } camera { location < 12.00, 12.00, -6.00 > right < -1.20, 0.00, 0.00 > up < 0.00, 0.00, 0.90 > sky < 0.00, 0.00, 1.00 > look_at < 0.00, 0.00, 1.00 > } #declare crystal = texture { pigment { color rgb < 1.00, 1.00, 1.00 > filter .85} finish { diffuse 0.1 specular 0.1 roughness 0.5 ambient 0.1 reflection 0.15} } #declare tinta_A = texture { pigment { color rgb < 0.80, 0.80, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare sd = seed(33244232); #declare i = -6; #declare j = -6; #declare k = -6; #while (i < 6) // dimensão em x #while (k < 6) #while (j < 6) sphere { 0.2 texture { crystal } } #if(k = -6) cylinder { 0.1 open texture { tinta_A } } #else cylinder { 0.1 open texture { tinta_A } } #end #if( j = -6) cylinder { 0.1 open texture { tinta_A } } #else cylinder { 0.1 open texture { tinta_A } } #end #if ( i = -6) cylinder { 0.1 open texture { tinta_A } } #else cylinder { 0.1 open texture { tinta_A } } #end #declare R = rand(sd); #declare G = rand(sd); #declare B = rand(sd); #declare object_prob = rand(sd); #declare sphere_prob = rand(sd); #declare cone_prob = rand(sd); #if (object_prob < 0.5) #declare base_sphere = rand(sd); #if (sphere_prob < 0.3) sphere { 0.4*base_sphere pigment {color rgb}} #else #if (sphere_prob < 0.6) sphere { 0.4*base_sphere pigment {color rgb}} #else sphere { 0.4*base_sphere pigment {color rgb}} #end #end #else #declare base = rand(sd); #if (cone_prob < 0.3) cone { 0.2*base 0.1 pigment {color rgb} finish { diffuse 0.1 specular 0.1 roughness 0.001 ambient 0.1 reflection 0.15}} #else #if (cone_prob < 0.6) cone { 0.2*base 0.1 pigment {color rgb} finish { diffuse 0.1 specular 0.1 roughness 0.001 ambient 0.1 reflection 0.15}} #else cone { 0.2*base 0.1 pigment {color rgb} finish { diffuse 0.1 specular 0.1 roughness 0.001 ambient 0.1 reflection 0.15} } #end #end #end #declare j = j + 2; #end #declare j = -6; #declare k = k + 2; #end #declare k = -6; #declare i = i + 2; #end