// Last edited on DATE TIME by stolfi // ====================================================================== #declare ctr = < 0.00, 0.00, 5.00 >; #declare camDir = (< 30.00, 0.00, 10.00 >) - (< 0.00, 0.00, 5.00 >); camera { location ctr + 1.00*camDir right -1.00*x up 0.75*y sky z look_at ctr } // ====================================================================== // FONTES DE LUZ light_source { < 0.0, 0.0, 15.0 > // Posição da lâmpada. color rgb 2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < 40.0, 0.0, 0.0 > // Posição da lâmpada. color rgb 2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.3, 0.7, 0.7 > } //#declare raio = 2.000; #declare vidro = texture { pigment { color rgb < 1.0, 1.0, 1.0 > filter 1} finish { diffuse 0.1 specular 1 reflection 0.25 roughness 0.001 ambient 0.1 } } #declare cor1 = < 0.8, 0.2, 0.0 >; #declare cor2 = < 0.2, 0.8, 0.0 >; #declare cor3 = < 0.0, 0.2, 0.8 >; #declare cor4 = < 0.4, 0.0, 0.4 >; #declare liq1 = texture { pigment { color rgb cor1 filter 1} finish { diffuse 0.1 specular 1 reflection 0.25 roughness 0.001 ambient 0.1 } } #declare liq2 = texture { pigment { color rgb cor2 filter 1} finish { diffuse 0.1 specular 1 reflection 0.25 roughness 0.001 ambient 0.1 } } #declare liq3 = texture { pigment { color rgb cor3 filter 1} finish { diffuse 0.1 specular 1 reflection 0.25 roughness 0.001 ambient 0.1 } } #declare liq4 = texture { pigment { color rgb cor4 filter 1} finish { diffuse 0.1 specular 1 reflection 0.25 roughness 0.001 ambient 0.1 } } #declare grama=texture{ pigment { color rgb <0.1,0.6,0.0>} finish { diffuse 0.5 specular 0.20 roughness 0.05 ambient 0.05} } #declare pigSuporte=texture{ pigment { color rgb <0.9,0.5,0.0>} finish { diffuse 0.5 specular 0.20 roughness 0.05 ambient 0.05} } #declare inTubo = union { sphere{<0,0,0> 0.8} cylinder{<0,0,0> <0,0,10> 0.8} } #declare exTubo = union { sphere{<0,0,0> 1} cylinder{<0,0,0> <0,0,10> 1} torus{1 0.2 rotate<90,0,0> translate<0,0,10>} } #declare tubo = difference { object{exTubo} object{inTubo} texture{vidro} interior{ior 1.5} } #declare supLateral = difference { prism{0, 1, 4 <-5, 0> <5, 0> <2, 15> <-2, 15>} cylinder{<0,-2,-5> <0,2,-5> 6} } #declare largura = 20; #declare supBase = union { box {<-3, -largura/2, -0.5> <3, largura/2, 0.5>} text{ttf "ariblk.ttf" "A-Z" 0.1 0 rotate<90,0,90> translate<3, -1.5*largura/5,-0.3> pigment{color rgb cor1}} text{ttf "ariblk.ttf" "0-9" 0.1 0 rotate<90,0,90> translate<3, -0.5*largura/5,-0.3> pigment{color rgb cor2}} text{ttf "ariblk.ttf" "\" \"" 0.1 0 rotate<90,0,90> translate<3, 0.5*largura/5,-0.3> pigment{color rgb cor3}} text{ttf "ariblk.ttf" ".!#?" 0.1 0 rotate<90,0,90> translate<3, 1.5*largura/5,-0.3> pigment{color rgb cor4}} } #declare supTopo = difference { box{<-2, -largura/2, 0> <2, largura/2, 0.5>} union { #declare cont=0; #while(cont<4) cylinder{<0,0,-1> <0,0,1> 1.1 translate<0, (cont-1.5)*largura/5,0>} #declare cont=cont+1; #end } } #declare suporte = union { object{supLateral translate<0, -largura/2,0>} object{supLateral translate<0, largura/2,0>} object{supBase translate<0,0,1>} object{supTopo translate<0,0,11>} texture{pigSuporte} } #macro liquido(qtd, tex) intersection{ object{inTubo} cylinder{<0,0,-0.8> <0,0,-0.8+qtd*10.8+0.001> 1} texture{tex} interior{ior 1.4} } #end #include "dados.inc" #declare numTodos = numAz + num09 + numEs + numOu; union { object{suporte} union{ liquido(numAz/numTodos, liq1) object{tubo} translate<0,-1.5*largura/5,2.5> } union{ liquido(num09/numTodos, liq2) object{tubo} translate<0,-0.5*largura/5,2.5> } union{ liquido(numEs/numTodos, liq3) object{tubo} translate<0,0.5*largura/5,2.5> } union{ liquido(numOu/numTodos, liq4) object{tubo} translate<0,1.5*largura/5,2.5> } }