// Last edited on 2009-10-10 18:38:02 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.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_parede = texture{ pigment{ color rgb < 0.9, 0.9, 0.9 > } 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.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare larg = 4.5; #declare alt = 3.6; #declare tx_quadro = texture { pigment{ image_map { jpeg "eu.jpg" } scale } finish { diffuse 0.8 ambient 0.2 } } #declare raio = 2.000; #declare tamanho_mesa = 2.8; #declare mesa_base = box { <0,0,0>, <1,tamanho_mesa,0.13> texture{tx_plastico} } #declare mesa_perna = box { <0,0,0>, <0.05,0.05,1.4> texture{tx_plastico} } #declare mesa = union { object{ mesa_base translate <0,0,1.35> } object{ mesa_perna } object{ mesa_perna translate <0,2.75,0> } object{ mesa_perna translate <.95,0,0> } object{ mesa_perna translate <.95,2.75,0> } } #declare imac_borda_externa = box { <0,0,0>, <0.12,2,1> texture{tx_plastico} } #declare imac_borda_interna = box { <-0.1,0.1,0.1>, <0.13,1.9,0.9> texture{tx_fosca} } #declare imac_tela = box { <-0.1,0.1,0.1>, <0.09,1.9,0.9> texture{tx_fosca} } #macro m_imac(falha) #if(falha) object{ imac_tela } box{ <0,0.8,-0.25>, <0.12,1.2,0.105> texture{tx_plastico} } text{ ttf "arial.ttf" "FALHA!" 0.15, 0 rotate 90*x rotate 90*z scale <0.5,0.5,0.5> translate <0.02,0.25,0.3> } #else object{ imac_tela } box{ <0,0.8,-0.25>, <0.12,1.2,0.105> texture{tx_plastico} } text{ ttf "arial.ttf" "3.1495" 0.15, 0 rotate 90*x rotate 90*z scale <0.5,0.5,0.5> translate <0.02,0.25,0.3> } #end #end #macro imac(falha) union { difference { object { imac_borda_externa } object { imac_borda_interna } } #if(falha) object{ imac_tela } box{ <0,0.8,-0.25>, <0.12,1.2,0.105> texture{tx_plastico} } text{ ttf "arial.ttf" "FALHA!" 0.15, 0 rotate 90*x rotate 90*z scale <0.5,0.5,0.5> translate <0.02,0.25,0.3> } #else object{ imac_tela } box{ <0,0.8,-0.25>, <0.12,1.2,0.105> texture{tx_plastico} } text{ ttf "arial.ttf" "3.1495" 0.15, 0 rotate 90*x rotate 90*z scale <0.5,0.5,0.5> translate <0.02,0.25,0.3> } #end } #end #declare cadeira_base = box { <0,0,0>, <0.5,0.5,0.05> texture{tx_plastico} } #declare cadeira_encosto = box { <0,0,0>, <0.07,0.5,0.6> texture{tx_plastico} } #declare cadeira_perna = box { <0,0,0>, <0.05,0.05,0.5> texture{tx_plastico} } #declare cadeira = union { object{ cadeira_base translate <0,0,0.5>} object{ cadeira_encosto translate <0,0,0.5> } object{ cadeira_perna } object{ cadeira_perna translate <0.45,0.45,0> } object{ cadeira_perna translate <0.45,0,0> } object{ cadeira_perna translate <0,0.45,0> } } #declare parede = box { <0,0,0>, <0.1, 15, 12> texture {tx_parede} } #declare quadro = box { <0,0,0>, <4.5,3.6,0.05> texture {tx_quadro} } #macro assento(falha) union { object { mesa } object { imac(falha) translate <0,0.4,1.65>} object { cadeira scale <2,2,2> rotate 180*z translate <1.8,1.5,0>} } #end #macro assentos() #declare i=0; #declare j=0; #declare linhas=3; #declare colunas=4; #declare incremento_coluna = 4; #declare incremento_linha = 2; #declare altura_incremento = 1; union { #while (i } #else object{ assento(0) translate <-i*incremento_linha, j*incremento_coluna, i*altura_incremento> } #end #declare j=j+1; #end box { <0,0,0>, translate <-i*incremento_linha,0,i*altura_incremento> texture{tx_fosca} } #declare i=i+1; #declare j=0; #end union { object{ parede translate<-(incremento_linha)*(linhas-1)-0.1,0,-0.2>} object{ quadro rotate 90*x rotate 90*z translate<-(incremento_linha)*(linhas-1),2,5>} } } #end union { // object{ eixos(3) } object{ assentos() } rotate 90*z } // Original camera parameters: // #local cam_ctr = <0.00,0.00,3.00> // #local cam_vec = (<14.00,7.00,3.50>-<0.00,0.00,3.00>) // #local cam_sky = z #include "camlight.inc" camlight(<-2.00,4.00,8.00>,10.5,<10,10,7>,24.0,z,1.2)