// Last edited on 2003-06-28 02:55:12 by stolfi // Amandio Sena // RA 007998 // // trabalho 10 de MC930 // A Rebimboca da Parafuseta // #include "textures.inc" #include "colors.inc" // The include files contain #include "stones.inc" // pre-defined scene elements #include "metals.inc" #include "woods.inc" #include "finish.inc" background{ color rgb < 0.00, 0.03, 0.15 > } camera { location < -2, 5, -15> right 1.2*x up 0.9*y sky y look_at <0, 3, 0> } light_source { 100*< -2.00, 2.00, -3.00 > color rgb 0.8*< 1.00, 1.00, 1.00 > } light_source { 100*< +3, +4.00, -3.00 > color rgb 0.8*< 1.00, 1.00, 1.00 > } light_source { 100*< 3, 3.00, -15.00 > color rgb 1.0*< 1.00, 1.00, 1.00 > } #declare cor_cristal = < 0.40, 0.95, 1.00 >; #declare tx_cristal = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.05 specular 1 roughness 0.001 } pigment { color cor_cristal filter 1 } } #declare cor_espelho = < 0.97, 0.97, 0.97 >; #declare tinta_A = texture{ pigment{ rgb cor_espelho } finish{ ambient 0.05 diffuse 0.05 reflection 0.05 specular 0.02 roughness 0.05 } } #declare tinta_C = //madeira texture { pigment { DMFWood4 // pre-defined in textures.inc scale 4 // scale by the same amount in all // directions } finish { Shiny } // pre-defined in finish.inc } #declare plano = plane { <0, 1, 0>, -1 pigment { checker color Red, color Blue } } #declare A = text { ttf "arial.ttf" "A" 1, 0 pigment { Blue } translate <0,6.5,-4> } #declare B = text { ttf "arial.ttf" "B" 1, 0 pigment { Green } translate <-1.5,6,-4> } #declare C = text { ttf "arial.ttf" "C" 1, 0 pigment { Red } translate <1.5,6,-4> } #declare vidroe = box { <-2.5, .5,-3.01>, // Near lower left corner <-.5,5.5,-2.99> // Far upper right corner texture { tx_cristal } } #declare vidrod = box { <2.5, .5,-3.01>, // Near lower left corner <.5,5.5,-2.99> // Far upper right corner texture { tx_cristal } } #declare frentee = union { difference { box { <-3,0,-3.01>, // Near lower left corner <-.02,6,-2.99> // Far upper right corner texture { tinta_C } } box { <-2.5,.5,-3.02>, <-.5,5.5,-2.98> } } object { B } } #declare frented = union { difference { box { <3,0,-3.01>, // Near lower left corner <.02,6,-2.99> // Far upper right corner texture { tinta_C } } box { <2.5,.5,-3.02>, <.5,5.5,-2.98> } } object { C } } #declare fundo = union { box { <-3,0,.01>, // Near lower left corner <3,6,-.99> // Far upper right corner texture { tinta_C } } object { A } } #declare ladoe = box { <-3.01,0,0>, <-2.99,6,-3> texture { tinta_C } } #declare ladod = box { <3.01,0,0>, <2.99,6,-3> texture { tinta_C } } #declare baixo = box { <-3,0,0>, <3,.2,-3> texture { tinta_C } } #declare cima = box { <-3,5.98,0>, <3,6,-3> texture { tinta_C } } #declare armario = union { object { fundo } object { ladoe } object { ladod } object { baixo } object { cima } #if (clock<=0.4) // clock pode ser zero --> evitar divisao por zero object { frentee translate <1-.4/(clock+.001),-1+.4/(clock+.001),1-.4/(clock+.001)> } object { frented translate <-1+.4/(clock+.001),-1+.4/(clock+.001),1-.4/(clock+.001)> } #else object { vidroe } // deveria ser object { frentee } --stolfi object { vidrod } // deveria ser object { frented } --stolfi #if (clock<=0.8) object { vidroe translate <1-.8/(clock),-1+.8/(clock),1-.8/(clock)> } object { vidrod translate <-1+.8/(clock),-1+.8/(clock),1-.8/(clock)> } #else object { vidroe } object { vidrod } #end #end } union { object { armario } object { plano } }