// Last edited on 2009-11-24 22:19:31 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 #include "nuvens.inc" #declare tx_grade = texture{ pigment{ color rgb < 0.80, 1.00, 0.20 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.40, 0.40 > } finish{ diffuse 0.5 reflection 0.8*< 0.80, 0.80, 0.00 > 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_cinza = texture{ pigment{ color rgb < 0.60, 0.60, 0.60 > } finish{ diffuse 0.9 ambient 0.1 } } #include "retalho.inc" #macro meio_carro( a11, a12, a13, a21, a22, a23, a31, a32, a33, b12, b13, b22, b23, b32, b33, c12, c13, c22, c23, c32, c33, d12, d13, d22, d23, d32, d33, e12, e13, e14, e22, e23, e24, e32, e33, e34 ) #declare a41 = < 0, a31.y, a31.z >; #declare a42 = < 0, a32.y, a32.z >; #declare a43 = < 0, a33.y, a33.z >; #declare b42 = < 0, b32.y, b32.z >; #declare b43 = < 0, b33.y, b33.z >; #declare c42 = < 0, c32.y, c32.z >; #declare c43 = < 0, c33.y, c33.z >; #declare d42 = < 0, d32.y, d32.z >; #declare d43 = < 0, d33.y, d33.z >; #declare e42 = < 0, e32.y, e32.z >; #declare e43 = < 0, e33.y, e33.z >; #declare e44 = < 0, e34.y, e34.z >; #declare a14 = (a13 + b12) / 2; #declare a24 = (a23 + b22) / 2; #declare a34 = (a33 + b32) / 2; #declare a44 = (a43 + b42) / 2; #declare b11 = (a13 + b12) / 2; #declare b21 = (a23 + b22) / 2; #declare b31 = (a33 + b32) / 2; #declare b41 = (a43 + b42) / 2; #declare b14 = (b13 + c12) / 2; #declare b24 = (b23 + c22) / 2; #declare b34 = (b33 + c32) / 2; #declare b44 = (b43 + c42) / 2; #declare c11 = (b13 + c12) / 2; #declare c21 = (b23 + c22) / 2; #declare c31 = (b33 + c32) / 2; #declare c41 = (b43 + c42) / 2; #declare c14 = (c13 + d12) / 2; #declare c24 = (c23 + d22) / 2; #declare c34 = (c33 + d32) / 2; #declare c44 = (c43 + d42) / 2; #declare d11 = (c13 + d12) / 2; #declare d21 = (c23 + d22) / 2; #declare d31 = (c33 + d32) / 2; #declare d41 = (c43 + d42) / 2; #declare d14 = (d13 + e12) / 2; #declare d24 = (d23 + e22) / 2; #declare d34 = (d33 + e32) / 2; #declare d44 = (d43 + e42) / 2; #declare e11 = (d13 + e12) / 2; #declare e21 = (d23 + e22) / 2; #declare e31 = (d33 + e32) / 2; #declare e41 = (d43 + e42) / 2; union{ retalho(a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, a44, tx_grade, tx_fosca) retalho(b11, b12, b13, b14, b21, b22, b23, b24, b31, b32, b33, b34, b41, b42, b43, b44, tx_grade, tx_vidro) retalho(c11, c12, c13, c14, c21, c22, c23, c24, c31, c32, c33, c34, c41, c42, c43, c44, tx_grade, tx_fosca) retalho(d11, d12, d13, d14, d21, d22, d23, d24, d31, d32, d33, d34, d41, d42, d43, d44, tx_grade, tx_vidro) retalho(e11, e12, e13, e14, e21, e22, e23, e24, e31, e32, e33, e34, e41, e42, e43, e44, tx_grade, tx_fosca) object{ roda translate < 6 , 1, -0.1 > } object{ roda translate < 6 , 9, -0.1 > } } #end #declare raio = 2.000; #declare roda = union{ cylinder{ < 0.00, 0.00, 0.00 >, < +1.00, 0.00, 0.00 >, 1 texture{ tx_cinza } } cylinder{ < 0.90, 0.00, 0.00 >, < +1.10, 0.00, 0.00 >, 0.5 texture{ tx_vidro } } } #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 } } } #macro carro( a11, a12, a13, a21, a22, a23, a31, a32, a33, b12, b13, b22, b23, b32, b33, c12, c13, c22, c23, c32, c33, d12, d13, d22, d23, d32, d33, e12, e13, e14, e22, e23, e24, e32, e33, e34 ) union{ object{ meio_carro( a11, a12, a13, a21, a22, a23, a31, a32, a33, b12, b13, b22, b23, b32, b33, c12, c13, c22, c23, c32, c33, d12, d13, d22, d23, d32, d33, e12, e13, e14, e22, e23, e24, e32, e33, e34 ) } object{ meio_carro( a11, a12, a13, a21, a22, a23, a31, a32, a33, b12, b13, b22, b23, b32, b33, c12, c13, c22, c23, c32, c33, d12, d13, d22, d23, d32, d33, e12, e13, e14, e22, e23, e24, e32, e33, e34 ) scale < -1, 1, 1 > } } #end #macro cena( ck ) #local ck1 = 0.0; #local q1a11 = < 6,-6,0 >; #local q1a12 = < 6,-4,0 >; #local q1a13 = < 6,-2,0 >; #local q1a21 = < 4,-6,0 >; #local q1a22 = < 4,-4,1 >; #local q1a23 = < 4,-2,2 >; #local q1a31 = < 2,-6,0 >; #local q1a32 = < 2,-4,2 >; #local q1a33 = < 2,-2,2 >; #local q1b12 = < 6,0,1 >; #local q1b13 = < 6,2,1 >; #local q1b22 = < 4,0,2.5 >; #local q1b23 = < 4,2,3 >; #local q1b32 = < 2,0,3 >; #local q1b33 = < 2,2,4 >; #local q1c12 = < 6,4,0 >; #local q1c13 = < 6,6,0 >; #local q1c22 = < 4,4,3 >; #local q1c23 = < 4,6,3 >; #local q1c32 = < 2,4,4.5 >; #local q1c33 = < 2,6,4.5 >; #local q1d12 = < 6,8,1 >; #local q1d13 = < 6,10,1 >; #local q1d22 = < 4,8,3.5 >; #local q1d23 = < 4,10,2.5 >; #local q1d32 = < 2,8,3.5 >; #local q1d33 = < 2,10,2.5 >; #local q1e12 = < 6,12,0 >; #local q1e13 = < 6,14,0 >; #local q1e14 = < 6,14.5,0 >; #local q1e22 = < 4,12,2 >; #local q1e23 = < 4,14,1 >; #local q1e24 = < 4,14.5,0 >; #local q1e32 = < 2,12,2 >; #local q1e33 = < 2,14,1 >; #local q1e34 = < 2,14.5,0 >; #local ck2 = 0.3; #local q2a11 = < 6,-6,0 >; #local q2a12 = < 6,-4,0 >; #local q2a13 = < 6,-2,0 >; #local q2a21 = < 4,-6,4 >; #local q2a22 = < 4,-4,1 >; #local q2a23 = < 4,-2,2 >; #local q2a31 = < 2,-6,3 >; #local q2a32 = < 2,-4,2 >; #local q2a33 = < 2,-2,2 >; #local q2b12 = < 6,0,1 >; #local q2b13 = < 6,2,1 >; #local q2b22 = < 4,0,2.5 >; #local q2b23 = < 4,2,3 >; #local q2b32 = < 2,0,2.5 >; #local q2b33 = < 2,2,3 >; #local q2c12 = < 6,4,0 >; #local q2c13 = < 6,6,0 >; #local q2c22 = < 4,4,2.5 >; #local q2c23 = < 4,6,2.5 >; #local q2c32 = < 2,4,3 >; #local q2c33 = < 2,6,3 >; #local q2d12 = < 6,8,1 >; #local q2d13 = < 6,10,1 >; #local q2d22 = < 4,8,2.5 >; #local q2d23 = < 4,10,2 >; #local q2d32 = < 2,8,2.5 >; #local q2d33 = < 2,10,2 >; #local q2e12 = < 6,12,0 >; #local q2e13 = < 6,14,0 >; #local q2e14 = < 7,14.5,0 >; #local q2e22 = < 4,12,2 >; #local q2e23 = < 4,14,1 >; #local q2e24 = < 4,14.5,0 >; #local q2e32 = < 2,12,2 >; #local q2e33 = < 2,14,1 >; #local q2e34 = < 2,16,0 >; #local ck3 = 0.6; #local q3a11 = < 6,-4,0 >; #local q3a12 = < 6,-3,0 >; #local q3a13 = < 6,-2,0 >; #local q3a21 = < 4,-4,0 >; #local q3a22 = < 4,-3,1 >; #local q3a23 = < 4,-2,2 >; #local q3a31 = < 2,-4,0 >; #local q3a32 = < 2,-3,2 >; #local q3a33 = < 2,-2,4 >; #local q3b12 = < 6,0,1 >; #local q3b13 = < 6,2,1 >; #local q3b22 = < 4,0,3 >; #local q3b23 = < 4,2,4 >; #local q3b32 = < 2,0,5 >; #local q3b33 = < 2,2,6 >; #local q3c12 = < 6,4,0 >; #local q3c13 = < 6,6,0 >; #local q3c22 = < 4,4,4 >; #local q3c23 = < 4,6,4 >; #local q3c32 = < 2,4,6 >; #local q3c33 = < 2,6,6 >; #local q3d12 = < 6,8,1 >; #local q3d13 = < 6,10,1 >; #local q3d22 = < 4,8,4 >; #local q3d23 = < 4,10,3 >; #local q3d32 = < 2,8,5 >; #local q3d33 = < 2,10,4 >; #local q3e12 = < 6,12,0 >; #local q3e13 = < 6,14,0 >; #local q3e14 = < 6,14.5,0 >; #local q3e22 = < 4,12,2 >; #local q3e23 = < 4,14,1 >; #local q3e24 = < 4,14.5,0 >; #local q3e32 = < 2,12,3 >; #local q3e33 = < 2,14,2 >; #local q3e34 = < 2,14.5,0 >; #local ck4 = 1; #if( ( ck >= ck1 ) & ( ck < ck2 ) ) #local tt = (ck - ck1) / (ck2 - ck1); #local a11 = (1 - tt) * q1a11 + tt * q2a11; #local a12 = (1 - tt) * q1a12 + tt * q2a12; #local a13 = (1 - tt) * q1a13 + tt * q2a13; #local a21 = (1 - tt) * q1a21 + tt * q2a21; #local a22 = (1 - tt) * q1a22 + tt * q2a22; #local a23 = (1 - tt) * q1a23 + tt * q2a23; #local a31 = (1 - tt) * q1a31 + tt * q2a31; #local a32 = (1 - tt) * q1a32 + tt * q2a32; #local a33 = (1 - tt) * q1a33 + tt * q2a33; #local b12 = (1 - tt) * q1b12 + tt * q2b12; #local b13 = (1 - tt) * q1b13 + tt * q2b13; #local b22 = (1 - tt) * q1b22 + tt * q2b22; #local b23 = (1 - tt) * q1b23 + tt * q2b23; #local b32 = (1 - tt) * q1b32 + tt * q2b32; #local b33 = (1 - tt) * q1b33 + tt * q2b33; #local c12 = (1 - tt) * q1c12 + tt * q2c12; #local c13 = (1 - tt) * q1c13 + tt * q2c13; #local c22 = (1 - tt) * q1c22 + tt * q2c22; #local c23 = (1 - tt) * q1c23 + tt * q2c23; #local c32 = (1 - tt) * q1c32 + tt * q2c32; #local c33 = (1 - tt) * q1c33 + tt * q2c33; #local d12 = (1 - tt) * q1d12 + tt * q2d12; #local d13 = (1 - tt) * q1d13 + tt * q2d13; #local d22 = (1 - tt) * q1d22 + tt * q2d22; #local d23 = (1 - tt) * q1d23 + tt * q2d23; #local d32 = (1 - tt) * q1d32 + tt * q2d32; #local d33 = (1 - tt) * q1d33 + tt * q2d33; #local e12 = (1 - tt) * q1e12 + tt * q2e12; #local e13 = (1 - tt) * q1e13 + tt * q2e13; #local e14 = (1 - tt) * q1e14 + tt * q2e14; #local e22 = (1 - tt) * q1e22 + tt * q2e22; #local e23 = (1 - tt) * q1e23 + tt * q2e23; #local e24 = (1 - tt) * q1e24 + tt * q2e24; #local e32 = (1 - tt) * q1e32 + tt * q2e32; #local e33 = (1 - tt) * q1e33 + tt * q2e33; #local e34 = (1 - tt) * q1e34 + tt * q2e34; #end #if( ( ck >= ck2 ) & ( ck < ck3 ) ) #local tt = (ck - ck2) / (ck3 - ck2); #local a11 = (1 - tt) * q2a11 + tt * q3a11; #local a12 = (1 - tt) * q2a12 + tt * q3a12; #local a13 = (1 - tt) * q2a13 + tt * q3a13; #local a21 = (1 - tt) * q2a21 + tt * q3a21; #local a22 = (1 - tt) * q2a22 + tt * q3a22; #local a23 = (1 - tt) * q2a23 + tt * q3a23; #local a31 = (1 - tt) * q2a31 + tt * q3a31; #local a32 = (1 - tt) * q2a32 + tt * q3a32; #local a33 = (1 - tt) * q2a33 + tt * q3a33; #local b12 = (1 - tt) * q2b12 + tt * q3b12; #local b13 = (1 - tt) * q2b13 + tt * q3b13; #local b22 = (1 - tt) * q2b22 + tt * q3b22; #local b23 = (1 - tt) * q2b23 + tt * q3b23; #local b32 = (1 - tt) * q2b32 + tt * q3b32; #local b33 = (1 - tt) * q2b33 + tt * q3b33; #local c12 = (1 - tt) * q2c12 + tt * q3c12; #local c13 = (1 - tt) * q2c13 + tt * q3c13; #local c22 = (1 - tt) * q2c22 + tt * q3c22; #local c23 = (1 - tt) * q2c23 + tt * q3c23; #local c32 = (1 - tt) * q2c32 + tt * q3c32; #local c33 = (1 - tt) * q2c33 + tt * q3c33; #local d12 = (1 - tt) * q2d12 + tt * q3d12; #local d13 = (1 - tt) * q2d13 + tt * q3d13; #local d22 = (1 - tt) * q2d22 + tt * q3d22; #local d23 = (1 - tt) * q2d23 + tt * q3d23; #local d32 = (1 - tt) * q2d32 + tt * q3d32; #local d33 = (1 - tt) * q2d33 + tt * q3d33; #local e12 = (1 - tt) * q2e12 + tt * q3e12; #local e13 = (1 - tt) * q2e13 + tt * q3e13; #local e14 = (1 - tt) * q2e14 + tt * q3e14; #local e22 = (1 - tt) * q2e22 + tt * q3e22; #local e23 = (1 - tt) * q2e23 + tt * q3e23; #local e24 = (1 - tt) * q2e24 + tt * q3e24; #local e32 = (1 - tt) * q2e32 + tt * q3e32; #local e33 = (1 - tt) * q2e33 + tt * q3e33; #local e34 = (1 - tt) * q2e34 + tt * q3e34; #end #if( ( ck >= ck3 ) & ( ck <= ck4 ) ) #local tt = (ck - ck3) / (ck4 - ck3); #local a11 = (1 - tt) * q3a11 + tt * q1a11; #local a12 = (1 - tt) * q3a12 + tt * q1a12; #local a13 = (1 - tt) * q3a13 + tt * q1a13; #local a21 = (1 - tt) * q3a21 + tt * q1a21; #local a22 = (1 - tt) * q3a22 + tt * q1a22; #local a23 = (1 - tt) * q3a23 + tt * q1a23; #local a31 = (1 - tt) * q3a31 + tt * q1a31; #local a32 = (1 - tt) * q3a32 + tt * q1a32; #local a33 = (1 - tt) * q3a33 + tt * q1a33; #local b12 = (1 - tt) * q3b12 + tt * q1b12; #local b13 = (1 - tt) * q3b13 + tt * q1b13; #local b22 = (1 - tt) * q3b22 + tt * q1b22; #local b23 = (1 - tt) * q3b23 + tt * q1b23; #local b32 = (1 - tt) * q3b32 + tt * q1b32; #local b33 = (1 - tt) * q3b33 + tt * q1b33; #local c12 = (1 - tt) * q3c12 + tt * q1c12; #local c13 = (1 - tt) * q3c13 + tt * q1c13; #local c22 = (1 - tt) * q3c22 + tt * q1c22; #local c23 = (1 - tt) * q3c23 + tt * q1c23; #local c32 = (1 - tt) * q3c32 + tt * q1c32; #local c33 = (1 - tt) * q3c33 + tt * q1c33; #local d12 = (1 - tt) * q3d12 + tt * q1d12; #local d13 = (1 - tt) * q3d13 + tt * q1d13; #local d22 = (1 - tt) * q3d22 + tt * q1d22; #local d23 = (1 - tt) * q3d23 + tt * q1d23; #local d32 = (1 - tt) * q3d32 + tt * q1d32; #local d33 = (1 - tt) * q3d33 + tt * q1d33; #local e12 = (1 - tt) * q3e12 + tt * q1e12; #local e13 = (1 - tt) * q3e13 + tt * q1e13; #local e14 = (1 - tt) * q3e14 + tt * q1e14; #local e22 = (1 - tt) * q3e22 + tt * q1e22; #local e23 = (1 - tt) * q3e23 + tt * q1e23; #local e24 = (1 - tt) * q3e24 + tt * q1e24; #local e32 = (1 - tt) * q3e32 + tt * q1e32; #local e33 = (1 - tt) * q3e33 + tt * q1e33; #local e34 = (1 - tt) * q3e34 + tt * q1e34; #end object{ carro( a11, a12, a13, a21, a22, a23, a31, a32, a33, b12, b13, b22, b23, b32, b33, c12, c13, c22, c23, c32, c33, d12, d13, d22, d23, d32, d33, e12, e13, e14, e22, e23, e24, e32, e33, e34 ) } #end //object{ eixos(10) } object{ cena( clock ) } // Original camera parameters: // #local cam_ctr = <13.00,4.00,10.00> // #local cam_loc = (1.5 * <24.00,4.50,9.50>) // #local cam_vec = ((1.5 * <24.00,4.50,9.50>)-<13.00,4.00,10.00>) // #local cam_sky = z #include "camlight.inc" camlight(<0.00,7.00,1.00>,15.000,<10,10,10>,45.0,z,1.2)