// Arquivo para exemplificar exemplo de aplicação gráfica. // Last edited on 2001-06-09 22:20:11 by stolfi #include "colors.inc" camera { location < 15.00, 15.00, 15.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, 0.0 > } light_source { < 7.00, 5.00, 7.00 > color rgb < 1.00, 1.00, 1.00 > } background { color Grey } #declare gerador = seed (1); #declare j = 0; sphere{ , 0.5 pigment{ Orange } } #declare fileira = union { #declare i = 0; #while (i<10) #declare r=1 + 0.1*i; #declare treco = #if (i = 7) box {<-r,-r,-r>, <+r,+r,+r> } #else sphere{ <0,0,0>, r} #end object{ treco translate <3*i, i*i/5, 0> } #declare i = i+1; #end pigment{ color rgb <1,0,0> } } #declare esferas = union { #declare i = 0; #while (i<4) #declare r=0.2 + 0.1*i; #declare treco = #if (i = 7) box {<-r,-r,-r>, <+r,+r,+r> } #else sphere{ <0,0,0>, r} #end object{ treco translate <2*i, i*i/2, 0> } #declare i = i+1; #end pigment{ color rgb <1,0,0> } } #declare cubos = union { #declare i = 0; #while (i<4) #declare r=0.2 + 0.1*i; #declare cubo = box {< 0, 0, 0>, < 1, 0.2 ,1> } object{ cubo translate } #declare i = i+1; #end pigment{ color rgb <0,1,0> } } #declare tx_base_superior = texture{ finish{ ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { Yellow filter 1 } } #declare base = box{ <08.0, 06.0, -2.0>, <-10.0, -06.0, -0.0> pigment{ Yellow } } #declare base_superior = box{ <7.5, 5.5, 4.0>, <-9.5, -5.5, 4.2> texture{ tx_base_superior } } #declare coluna = cylinder { < 0.0, 0.0, 0.0>, < 0.0, 0.0, 4.0>, 1.0 pigment { Yellow } } #declare arco = torus { 4, 0.4 pigment { Yellow } } #declare torre = cylinder { < 0.0, 0.0, 0.0>, < 0.0, 0.0, 2.0>, 3.0 pigment { Yellow } } #declare torre_menor = cylinder { < 0.0, 0.0, 0.0>, < 0.0, 0.0, 2.0>, 1.0 pigment { Yellow } } #declare escada = box{ <0.0, 00.0, 0.0>, < 10.0, 1.0, 1.0> pigment{ Yellow } } #declare chao = box{ <29.0, 29.0, -2.2>, < -29.0, -29.0, -2.0> pigment{ marble } } // box { <-19.0, 0.0, 0.0>, < 19.0, 0.0, 0.06 > pigment{ Blue } } // box { <0.0, -19.0, 0.0>, < 0.0, 19.0, 0.06 > pigment{ Green } } // box { <0.0, 0.0, -19.0>, < 0.06, 0.0, 19.0 > pigment{ Yellow } } object { union { object{ chao } object{ base } object{ escada translate <-5, 6, -2> } object{ escada translate <-5, 7, -2> } object{ escada translate <-5, 6, -1> } object{ escada rotate 90*z translate<9, -5, -2> } object{ escada rotate 90*z translate<10, -5, -2> } object{ escada rotate 90*z translate<9, -5, -1> } object{ esferas translate < 2, -4, 1> } object{ esferas translate < 2, -4, 1> rotate -180*z } // object{ esferas translate < 2, -4, 1> // rotate -45*y } object{ coluna translate < 5, 4, 0> } object{ coluna translate < -5, 4, 0> } object{ coluna translate < 0, -2.5, 0> } object{ arco translate < 0, 4, 0> } object{ base_superior } object{ torre translate < 0, 0, 4> } object{ torre_menor translate < 0, 0, 6> } object{ cubos translate < 2, -4, 4.2> } object{ cubos translate < 2, -4, 4.2> rotate -180*z } // object{ cubos translate < 2, -4, 4.2> // rotate 60*z } // object{ cubos translate < 2, -4, 4.2> // rotate -60*z } } }