// Ivan Francisco Coutinho Costa // Last edited on 2003-05-31 00:44:46 by stolfi // RA 001833 // MC930 - TP 8 - Instrumento Musical // Data 15/05/2003 #include "colors.inc" #include "textures.inc" #include "woods.inc" background { color HuntersGreen } #declare ctr = <8,1,0>; camera { location ctr + 0.60*<10, 20, -50> look_at ctr } light_source { 100*<4, 3, -7> color 1.0*White } light_source { 100*<-4, 2, -7> color 0.8*White } plane { y, -12 pigment { checker Grey, Tan scale 5 } } #declare tick_corpo = 4; #declare corpo= prism { cubic_spline 0, // z inf tick_corpo, // z sup 7, // num pontos < 0,16 >, //1 controle < 20, 8>, //2 <0, 16>, //3 <6,8> < 0, 0>, //4 < 20, 8>, //5 # fecha <0, 0> //6 controle pigment { color Red } } #declare braco= lathe { quadratic_spline 7, <0,0>, <3,0>, <5,19>, <8,20>, <5,21>, <1,40>, <0,40> pigment { Blue } finish { ambient .3 phong .75 } } #declare tarracha= lathe { linear_spline 7, <0,0>, <2.5, 2.5>, <1.0, 3.5>, <2.0, 5.0>, <0.7, 6.5>, <1.8, 7.5>, <0.0, 10> pigment { Green } finish { ambient .3 phong .75 } } #declare sc_braco = 1/3; #declare sc_tarr = 1/1.5; #declare xbra = 19.5; #declare len_bra = 40 * sc_braco; #declare xtar = xbra+ len_bra; #declare instrumento = difference { union { object { corpo rotate <90,0,0> translate <0,8,0> translate <0,0,-tick_corpo/2>} object { braco rotate <0,0,-90> scale translate } object { tarracha rotate <0,0,-90> scale scale <1/2,0,0> translate } } cylinder { <0,0,-10>, <0,0,10>, 2.5 translate <10,0,0> } } // a cena union { object { instrumento translate <-10,0,0> } // sphere{ <0,0,0>, 2 pigment { Yellow } } rotate <0,0,30> }