/*camera { location <-250,0,750> look_at <-250,0,0> }*/ camera { location <-10,295,-770> look_at <-10,295,0> } light_source { < -150, 300, -800> color rgb < 1, 1, 1> } light_source { <0, 0, 180> color rgb < 0, 0, 0> } background{<1,1,1>} //colores y texturas #declare MyTexture1= texture { pigment { rgbt <1, 0.1, 0.1, 0>} finish { phong 0.5 phong_size 0.5 } } #declare MyTexture2= texture { pigment { rgbt <0.1, 1, 0.1, 0>} finish { phong 0.5 phong_size 0.5 } } #declare MyTexture3= texture { pigment { rgbt <0.1, 0.1, 1, 0>} finish { phong 0.5 phong_size 0.5 } } #declare MyTexture4= texture { pigment { rgbt <1, 1, 0.1, 0>} finish { phong 0.5 phong_size 0.5 } } #declare MyTexture5= texture { pigment { rgbt <0.5, 0.5, 0.5, 0>} finish { phong 0.5 phong_size 0.5 } } //objetos y macros //andamio normal-------------------------------------------------------------------------------------------------------------------------- #macro BigaV(S,TX,TY,TZ,rX,rY,rZ) box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .4, 0, 0>} scale <1.9,S/2,1.9> translate<-S/2,0,-S/2> rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .4, 0, 0>} scale <1.9,S/2,1.9> translate<-S/2,0,S/2> rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .4, 0, 0>} scale <1.9,S/2,1.9> translate rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .4, 0, 0>} scale <1.9,S/2,1.9> translate rotate x*rX rotate y*rY rotate z*rZ translate } //pared transp. box { < -0.5,-0.5,-0.5 ><0.5,0.5,0.5 > pigment {color rgbt < .6, .7, .7, .5>} scale translate<0,0,0> rotate x*rX rotate y*rY rotate z*rZ translate finish { phong 0.2 phong_size 0.3 } } #end #macro BigaO(S,TX,TY,TZ,rX,rY,rZ) box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale translate<0,S/2,-S/2> rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale translate<0,S/2,S/2> rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale translate<0,-S/2,-S/2> rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale translate<0,-S/2,S/2> rotate x*rX rotate y*rY rotate z*rZ translate } #end #macro BigaP(S,TX,TY,TZ,rX,rY,rZ) box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale <1,1,S/2> translate rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale <1,1,S/2> translate rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale <1,1,S/2> translate<-S/2,-S/2,0> rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale <1,1,S/2> translate<-S/2,S/2,0> rotate x*rX rotate y*rY rotate z*rZ translate } #end #macro Ladder(S,TX,TY,TZ,rX,rY,rZ) BigaV(S,TX,TY,TZ,rX,rY,rZ) BigaO(S,TX,TY,TZ,rX,rY,rZ) BigaP(S,TX,TY,TZ,rX,rY,rZ) #end //ladder2------------------------------------------------------------------------------------------------------------------------------ //andamio con elemento centrale e cubo transparente #macro BigaV2(S,TX,TY,TZ,rX,rY,rZ) box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .2, 0, 0>} scale <1,S/2,1> translate rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale <1,S/2,1> translate rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .2, 0, 0>} scale <1,S/2,1> translate<-S/2,0,-S/2> rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale <1,S/2,1> translate<-S/2,0,S/2> rotate x*rX rotate y*rY rotate z*rZ translate } //pared transp. box { < -1,-1,-1 ><1,1,1 > pigment {color rgbt < .6, .7, .7, .5>} scale translate<0,0,0> rotate x*rX rotate y*rY rotate z*rZ translate finish { phong 0.4 phong_size 0.4 } } #end #macro BigaO2(S,TX,TY,TZ,rX,rY,rZ) box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale translate<0,0,-S/2> rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale translate<0,0,S/2> rotate x*rX rotate y*rY rotate z*rZ translate } #end #macro BigaP2(S,TX,TY,TZ,rX,rY,rZ) box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale <1,1,S/2> translate<-S/2,0,0> translate } box { < -1.1,-1.1,-1.1 ><1.1,1.1,1.1 > pigment {color rgbf < 1, .3, 0, 0>} scale <1,1,S/2> translate rotate x*rX rotate y*rY rotate z*rZ translate } #end #macro Ladder2(S,TX,TY,TZ,rX,rY,rZ) BigaV2(S,TX,TY,TZ,rX,rY,rZ) BigaO2(S,TX,TY,TZ,rX,rY,rZ) BigaP2(S,TX,TY,TZ,rX,rY,rZ) #end //ladder3--------------------------------------------------------------------------------------------------------------------------------- //piso y techo con ventana horizontal #macro Techo(S,TX,TY,TZ,rX,rY,rZ) box { < -1,-1,-1><1,1,1 > pigment {color rgbt < .4, .4, .4, 0>} scale translate<0,S/2-S/6,0> rotate x*rX rotate y*rY rotate z*rZ translate } box { < -1,-1,-1><1,1,1 > pigment {color rgbt < .4, .4, .4, 0>} scale translate<0,-S/2+S/6,0> rotate x*rX rotate y*rY rotate z*rZ translate } #end #macro Vidrio(S,TX,TY,TZ,rX,rY,rZ) box { < -0.95,-0.95,-0.95><0.95,0.95,0.95> pigment {color rgbf < 0.3, .7, 1, 0.9>} scale rotate x*rX rotate y*rY rotate z*rZ translate } #end #macro Ladder3(S,TX,TY,TZ,rX,rY,rZ) Techo(S,TX,TY,TZ,rX,rY,rZ) Vidrio(S,TX,TY,TZ,rX,rY,rZ) #end //Oja--------------------------------------------------------------------------------------------------------------------------------- //2 triangulos #macro Oja2(S,TX,TY,TZ,rX,rY,rZ) triangle { < 0,0,0>, <3,-1.5,0 >,<3,1.5,0 > pigment {color rgbt < .1, .7, .1, 0>} scale rotate y*rY rotate z*rZ rotate x*rX translate } triangle { < 3,1.5,0>, <3,-1.5,0 >,<6,0,0 > pigment {color rgbt < .1, .7, .1, 0>} scale rotate y*rY rotate z*rZ rotate x*rX translate } #end //Oja--------------------------------------------------------------------------------------------------------------------------------- //2 triangulos, con ejes de rotación #macro Oja(S,TX,TY,TZ,TX1,TY1,TZ1,rX,rY,rZ) #declare posX=S*9; #declare posY=S*3; #declare posZ=S/2; triangle { < 0,0,0>, , pigment {color rgbt < .1, .8, .1, 0.2>} scale <1,1,1> rotate z*rZ rotate y*rY rotate x*rX translate } triangle { < 0,0,0>, , pigment {color rgbt < .1, .8, .1, 0.3>} scale <1,1,1> rotate z*rZ rotate y*rY rotate x*rX translate } #end #macro MyCube(C,V1x,V1y,V1z,V2x,V2y,V2z,V3x,V3y,V3z,V4x,V4y,V4z,V5x,V5y,V5z,V6x,V6y,V6z,V7x,V7y,V7z,V8x,V8y,V8z) #declare R=0.0; #declare G=0.0; #declare B=0.0; #if (C=11) #declare R=1; #declare G=.1; #declare B=.1; #end //objeto red #if (C=12) #declare R=.1; #declare G=1; #declare B=.1; #end //objeto green #if (C=13) #declare R=.1; #declare G=.1; #declare B=1; #end //objeto blue #if (C=14) #declare R=.8; #declare G=.8; #declare B=.1; #end //objeto yellow #if (C=15) #declare R=.6; #declare G=.6; #declare B=.6; #end //objeto gray triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } triangle { , , pigment {color rgbt < R, G, B, 0>} } #end