/* TP04 */ #include "eixos.inc" #include "textures.inc" // Cores e texturas // ================ #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca2 = texture{ pigment{ color rgb < 0.70, 0.20, 0.30 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca3 = texture{ pigment{ color rgb < 0.30, 0.50, 0.40 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca4 = texture{ pigment{ color rgb < 0.15, 0.70, 0.35 > } finish{ diffuse 0.9 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.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare roleta = seed(315); // Descricao da cena // ================= #declare baseq = box {<0,0,0>, <-1, 1, 1>} #declare basec = cone{ <0, 0, 0>, 0.1, <0, 0, 0.2>, 0.05 } #declare est1 = union{ box {<0,0,0>, <-0.5, 3.5, 0.25> texture{tx_fosca}} text { ttf "arial.ttf" "Palavra" 0.2, 0.0 texture{Aluminum} rotate <90, 0, 90> translate <-0.25, 0.125, 0.25> } } #declare est2 = union{ cone{ <0, 0, 0>, 0.8, <0, 0, 0.2>, 0.6 texture {tx_fosca2}} text { ttf "arial.ttf" "!!!" 0.2, 0.0 texture{Chrome_Metal} rotate <90, 0, 90> translate <0, -0.25, 0.25> } } #declare est3 = union{ box {<0,0,0>, <-0.5, 0.65, 0.25> texture{tx_fosca3}} text { ttf "arial.ttf" "B" 0.2, 0.0 texture{Silver2} rotate <90, 0, 90> translate <-0.25, 0.125, 0.25> } } #declare est4 = union{ box {<0,0,0>, <-0.5, 5.5, 0.25> texture{tx_fosca4}} text { ttf "arial.ttf" "Braquicefalo" 0.2, 0.0 texture{Red_Marble} rotate <90, 0, 90> translate <-0.25, 0.125, 0.25> } } //Chao plane { z, -0.01 texture{tx_xadrez} } object{ eixos(3.00) } box{<5, -5, 0>, <-5, -5.1, 5> texture {tx_fosca}} box{<-5, -5.1, 0>, <-5.1, 5.1, 5> texture {tx_fosca}} object{est1 rotate<0,0, 50*rand(roleta)> translate <2, 3, 0>} object{est2 rotate<0,0, 50*rand(roleta)> translate <3, -2, 0>} object{est3 rotate<0,0, 50*rand(roleta)> translate <-1, -3, 0>} object{est4 rotate<0,0, 50*rand(roleta)> translate <-2, 2, 0>} #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 16.0; #declare dir_camera = < 1141.00, 2118.00, 815.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)