// Exercicio 2 // Last edited on 2001-06-09 20:40:14 by stolfi #include "colors.inc" background{ color rgb < 0.00, 0.53, 0.75 > } light_source { < 40.00, 100.00, 20.00 > color rgb < 1.00, 1.00, 1.00 > } camera { location < 6.00, 12.00, 0.50 > right < -0.80, 0.00, 0.00 > up < 0.00, 0.00, 0.60 > sky < 0.00, 0.00, 1.00 > look_at < 0.00, 0.00, 1.50 > } #declare detalhe = torus { 0.3, 0.05 // major and minor radius rotate 90*x // so we can see it from the top pigment { color rgb < 0.10, 0.80, 1.00 > } } #declare estrela = union { object {detalhe translate <0,0,0>} object {detalhe rotate 90*x translate <0,0,0>} object {detalhe rotate 150*x translate <0,0,0>} object {detalhe rotate -150*x translate <0,0,0>} } #declare pilar = cylinder { <0, 0, 0>, <0, 0, 2.5 >, 0.2 } #declare ruina = blob { threshold 0.5 #declare i = 3.5; #declare j = 0; #declare tonalidade = 1; #while ((i > 1) & (j < 1.6)) #if(i>2) #declare tonalidade = 1; #else #declare tonalidade = 5; #end sphere { <0,0,0>, i , 1 scale <0,0,0.2>translate<0,0,j>pigment{Blue*i/tonalidade } } #declare i = i-0.5; #declare j = j +0.3; #end finish {phong 1 } } object {ruina translate <0,0,0>} object {estrela translate <0,0,1.9>} #declare i = -3; #while ( i < 4 ) object {pilar translate <3,i,0>pigment{Gray}} object {pilar translate <4,i,0> pigment{Gray}} object {pilar translate <-3,i,0> pigment{Gray}} object {pilar translate <-4,i,0> pigment{Gray}} #declare i = i + 1; #end