GeSHi (c):#declare col_crome=texture{pigment {P_Chrome4} finish { ambient 0.12 diffuse .1 specular 1 roughness .001 metallic reflection { .85 metallic } }};#declare col_plast=texture{pigment{rgb<0.33,0.4,0.396>} finish{ambient .2 diffuse .6 phong .75 phong_size 25}}; #macro Rosca()lathe { linear_spline 5,<0,0>, <0.70,0>, <1,0.30>, <0.70,0.60>, <0,0.60>}#end #macro TORNILLO(textur)union{#local i=0;#while(i<20)object{Rosca() translate<0,-i*0.60,0>}#local i=i+1;#enddifference{ sphere{<0,0,0>,1.75} box{<-2,-2,-2><2,0.5,2>} box{<0,0,0><0.5,3,5> translate<-0.25,1.2,-2.5>} translate<0,-0.5,0>}texture{textur}}#end #macro TUERCA(textur)difference{union{ box{<-1.95,0,-1.125><1.95,1.25,1.125>} box{<-1.95,0,-1.125><1.95,1.25,1.125> rotate<0,60,0>} box{<-1.95,0,-1.125><1.95,1.25,1.125> rotate<0,-60,0>} } union{ #local i=0; #while(i<5) object{Rosca() translate<0,-0.15+i*0.59,0>} #local i=i+1; #end } lathe {linear_spline 5,<0,1.25>, <2,1.25>, <2.5,0.75>, <2.5,1.5>, <0,1.5>} lathe {linear_spline 5,<0,0>, <2.2,0>, <2.5,0.5>, <2.5,-0.5>, <0,-0.5>} difference{ cylinder{<0,-1,0><0,3,0>,2.5} cylinder{<0,-1.5,0><0,3.5,0>,2.15} } texture{textur} }#end
GeSHi (c):object{TORNILLO(col_plast) translate<-4,10,0>}object{TUERCA(col_plast) translate<-4,3,0>}object{TORNILLO(col_crome) rotate<0,30,0> translate<4,10,0>}object{TUERCA(col_crome) translate<4,3,-4>}
GeSHi (c):object {TOOLS_SCREW (2,8,0,Gray60) // translate <x,y,z> // rotate <x,y,z>}object {TOOLS_WASHER (2,2,Gray60)// translate <x,y,z> // rotate <x,y,z>} object {TOOLS_NUT (2,0,Gray60)// translate <x,y,z> // rotate <x,y,z>}
GeSHi (c):text {ttf besch_font value 0.5, 0 scale<0.3,0.3,0.3> translate<-0.45,-0.2,-0.9> rotate<0,0,0> pigment{White}} text {ttf besch_font value 0.5, 0 scale<0.3,0.3,0.3> translate<-0.45,-0.2,-0.9> rotate<90,0,0> pigment{White}} text {ttf besch_font value 0.5, 0 scale<0.3,0.3,0.3> translate<-0.45,-0.2,-0.9> rotate<180,0,0> pigment{White}}
GeSHi (c):// Vista de arriba (perspectiva) camera { location <0,8,-15> look_at <0,0,0> angle 30}