// Last edited on 2009-10-10 18:36:54 by stolfilocal // Processed by remove-cam-lights #macro eixo(ponta,cor,nome) union{ sphere{ <0,0,0>, 0.02 } cylinder{ <0,0,0>, 0.91*ponta, 0.02 } cone{ 0.90*ponta, 0.06, ponta, 0.00 } texture{ pigment{ color rgb cor } finish{ ambient 0.5 diffuse 0.5 } } } #end #macro eixos(tamanho) union{ object{ eixo( , <1.0,0.2,0.2>, "X") } object{ eixo( <0,tamanho,0>, <0.0,0.8,0.0>, "Y") } object{ eixo( <0,0,tamanho>, <0.3,0.3,1.0>, "Z") } } #end background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.40, 0.40 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_amarelo = texture{ pigment{ color rgb < 1.00, 0.80, 0.20 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_cinza = texture{ pigment{ color rgb < 0.60, 0.60, 0.60 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.90, 0.70 > } finish{ diffuse 0.1 reflection 0.8*< 1.00, 0.90, 0.70 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.50 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_quadro = texture{ pigment{ image_map{ jpeg "eu.jpg" } } finish{ diffuse 0.8 ambient 0.2 } } #declare raio = 2.000; #declare ex_esfera = sphere{ < 0.00, 0.00, 0.00 >, raio texture{ tx_plastico } } #declare ex_esfera = cylinder{ < -2.00, +2.00, -1.00 >, < +2.00, -2.00, +1.00 >, 0.75 texture{ tx_fosca } } #declare ex_caixa = box{ < +0.00, +0.00, +3.00 >, < +3.00, +3.00, +0.00 > texture{ tx_fosca } } #declare ex_diferenca = difference{ object{ ex_caixa } union{ object{ ex_esfera } object{ ex_caixa } } } #declare cad_corpo = box{ < +0.00, +0.00, +0.00 >, < +3.00, +3.00, +3.00 > texture{ tx_amarelo } } #declare cad_corpo_buraco_1 = box{ < +0.50, -0.10, -0.10 >, < +2.50, +3.10, +3.10 > texture{ tx_fosca } } #declare cad_corpo_buraco_2 = box{ < -0.10, +0.50, -0.10 >, < +3.10, +2.50, +3.10 > texture{ tx_fosca } } #declare cad_tampo = box{ < +0.00, +0.00, +3.00 >, < +3.00, +3.00, +3.20 > texture{ tx_fosca } } #declare cad_encosto = box{ < +0.00, +0.00, +3.20 >, < +3.00, +0.20, +6.20 > texture{ tx_fosca } } #declare cadeira = union{ difference{ object{ cad_corpo } union{ object{ cad_corpo_buraco_1 } object{ cad_corpo_buraco_2 } } } object{ cad_tampo } object{ cad_encosto } } #declare mesa_corpo = box{ < +0.00, +0.00, +0.00 >, < +5.00, +4.00, +4.50 > texture{ tx_amarelo } } #declare mesa_corpo_buraco_1 = box{ < +0.50, -0.10, -0.10 >, < +4.50, +4.10, +4.60 > texture{ tx_fosca } } #declare mesa_corpo_buraco_2 = box{ < -0.10, +0.50, -0.10 >, < +5.10, +3.50, +4.60 > texture{ tx_fosca } } #declare mesa_tampo = box{ < +0.00, +0.00, +4.50 >, < +5.00, +4.00, +4.70 > texture{ tx_fosca } } #declare mesa = union{ difference{ object{ mesa_corpo } union{ object{ mesa_corpo_buraco_1 } object{ mesa_corpo_buraco_2 } } } object{ mesa_tampo } } #declare comp_cpu = box{ < -0.50, +0.00, +0.00 >, < +2.50, +1.50, +0.70 > texture{ tx_cinza } } #declare comp_monitor = union{ box{ < +0.80, +0.60, +0.70 >, < +1.20, +0.90, +0.90 > texture{ tx_cinza } } box{ < +0.10, +0.10, +0.90 >, < +1.90, +1.40, +2.00 > texture{ tx_cinza } } } #declare comp_teclado = box{ < -0.50, -1.00, +0.00 >, < +2.50, -0.10, +0.30 > texture{ tx_cinza } } #declare computador = union{ object{ comp_cpu } object{ comp_monitor } object{ comp_teclado } } #declare estacao = union{ object{ cadeira } object{ mesa translate < -1.00, +2.00, +0.00 > } object{ computador translate < +0.50, +3.60, +4.50 > } } #macro fileiras( in, jn, ic, jc ) union{ #local i = 0; #local j = 0; #local im = in / 2; #local in = in + 1; #while( j < jn ) #while( i < in ) #if( i != im & (i != ic | j != jc)) object{ estacao translate < i * 8.00 + 2.00, j * 8.00 + 1.00, j * -0.60 > scale 0.2 } #end #local i = i + 1; #end #local j = j + 1; #local i = 0; #end } #end #declare piso = union{ box{ < +0.00, +0.00, +0.00 >, < +8.00, +8.00, -0.20 > texture{ tx_cinza } } box{ < +0.00, +7.80, -0.20 >, < +8.00, +8.00, -0.60 > texture{ tx_cinza } } } #macro chao( in, jn ) union{ #local j = 0; #while( j < jn ) #local i = 0; #while( i < in ) object{ piso translate < i * 8.00, j * 8.00, j * -0.60 > scale 0.2 } #local i = i + 1; #end #local j = j + 1; #end } #end #declare par_lateral = box{ < +0.00, +0.00, +0.00 >, < +0.20, +8.00, +20.00 > texture{ tx_cinza } } #declare par_fundo = box{ < +0.00, +0.00, +0.00 >, < +8.00, +0.20, +20.00 > texture{ tx_cinza } } #macro parede( in, jn ) union{ #local j = 0; #while( j < jn ) object{ par_lateral translate < +0.00, j * 8.00, j * -0.60 > scale 0.2 } #local j = j + 1; #end #local i = 0; #while( i < in ) object{ piso translate < i * 8.00, jn * 8.00, jn * -0.60 > scale 0.2 } object{ piso translate < i * 8.00, jn * 8.00 + 8.00, jn * -0.60 > scale 0.2 } #local i = i + 1; #end difference{ union{ object{ par_lateral translate < +0.00, jn * 8.00, jn * -0.60 > scale 0.2 } object{ par_lateral translate < +0.00, jn * 8.00 + 8.00, jn * -0.60 > scale 0.2 } } box{ < -0.10, +5.00, +0.00 >, < +0.30, +11.00, +10.00 > texture{ tx_cinza } translate < +0.00, jn * 8.00, jn * -0.60 > scale 0.2 } } #local i = 0; #while( i < in ) object{ par_fundo translate < i * 8.00, +0.00, +0.00 > scale 0.2 } #local i = i + 1; #end } #end #declare placa = text{ ttf "arial" "LEDES" 0.3, 0 texture{ tx_fosca } } #declare quadro = box{ < +0.00, +0.00, +0.00 >, < +1.00, +1.00, +0.10 > texture{ tx_quadro } } #macro sala( in, jn ) union{ object{ fileiras( in, jn, 3, 5 ) } object{ chao( in, jn ) } object{ parede( in, jn ) } object{ placa rotate 90 * x rotate 90 * z translate < +0.00, +3.00, +2.00 > } object{ estacao rotate 180 * z translate < 3 * 8.00 + 2.00, 7 * 8.00 + 1.00, jn * -0.60 > scale 0.2 } object{ quadro rotate 90 * z rotate 90 * y translate < +0.00, +10.65, +1.70 > } } #end object{ sala( 8, 6 ) } // Original camera parameters: // #local cam_ctr = <12.00,8.00,1.00> // #local cam_vec = ((1.5 * <14.00,7.00,7.50>)-<12.00,8.00,1.00>) // #local cam_sky = z #include "camlight.inc" camlight(<12.00,9.00,1.00>,10.0,<10,7,5>,24.0,z,1.2)