|
|
Well, the Legos are CSG objects
Batronyx wrote:
> Cool! Is this one hollow?
Yes, It's hollow
> Would a lego made from a mesh object let you get it any bigger?
There are 58 primitives in each Lego. See the source below.
>
>
> bat### [at] cadronhsacom
>
> Bryan Valencia wrote in message <3ACE7A01.4D8C6CFA@209software.com>...
> >This is about the biggest one I can do.
//My Lego Include
//Bryan Valencia
//bryan@209software.com
#declare LH=1.5;
#declare CT=LH+.25;
#declare Rounding=0.04;
#declare BX=2;
#declare BZ=4;
#declare Z=Rounding;
#declare FH=LH-Rounding;
#declare FX=BX-Rounding;
#declare FZ=BZ-Rounding;
#declare SubtractFrame=merge{
cylinder{<0,0,0><BX,0,0>,Rounding}
cylinder{<0,LH,0><BX,LH,0>,Rounding}
cylinder{<0,0,BZ><BX,0,BZ>,Rounding}
cylinder{<0,LH,BZ><BX,LH,BZ>,Rounding}
cylinder{<0,0,BZ><0,LH,BZ>,Rounding}
cylinder{<BX,0,BZ><BX,LH,BZ>,Rounding}
cylinder{<0,0,0><0,LH,0>,Rounding}
cylinder{<BX,0,0><BX,LH,0>,Rounding}
cylinder{<0,0,0><0,0,BZ>,Rounding}
cylinder{<BX,0,0><BX,0,BZ>,Rounding}
cylinder{<0,LH,0><0,LH,BZ>,Rounding}
cylinder{<BX,LH,0><BX,LH,BZ>,Rounding}
sphere{<0,0,0>,Rounding}//bottom4
sphere{<BX,0,0>,Rounding}
sphere{<BX,0,BZ>,Rounding}
sphere{<0,0,BZ>,Rounding}
sphere{<0,LH,0>,Rounding}//top
sphere{<BX,LH,0>,Rounding}
sphere{<BX,LH,BZ>,Rounding}
sphere{<0,LH,BZ>,Rounding}
}
#declare AddFrame=merge{
cylinder{<Z,Z,Z><FX,Z,Z>,Rounding}
cylinder{<Z,FH,Z><FX,FH,Z>,Rounding}
cylinder{<Z,Z,FZ><FX,Z,FZ>,Rounding}
cylinder{<Z,FH,FZ><FX,FH,FZ>,Rounding}
cylinder{<Z,Z,FZ><Z,FH,FZ>,Rounding}
cylinder{<FX,Z,FZ><FX,FH,FZ>,Rounding}
cylinder{<Z,Z,Z><Z,FH,Z>,Rounding}
cylinder{<FX,Z,Z><FX,FH,Z>,Rounding}
cylinder{<Z,Z,Z><Z,Z,FZ>,Rounding}
cylinder{<FX,Z,Z><FX,Z,FZ>,Rounding}
cylinder{<Z,FH,Z><Z,FH,FZ>,Rounding}
cylinder{<FX,FH,Z><FX,FH,FZ>,Rounding}
sphere{<Z,Z,Z>,Rounding}//bottom4
sphere{<FX,Z,Z>,Rounding}
sphere{<FX,Z,FZ>,Rounding}
sphere{<Z,Z,FZ>,Rounding}
sphere{<Z,FH,Z>,Rounding}//top
sphere{<FX,FH,Z>,Rounding}
sphere{<FX,FH,FZ>,Rounding}
sphere{<Z,FH,FZ>,Rounding}
}
#declare INR1=.4;
#declare InCyl=union{
difference{
cylinder{<0,0,0>,<0,LH-Rounding,0>,INR1}
cylinder{<0,-Rounding,0>,<0,LH-Rounding,0>,INR1-Rounding}
}
torus{INR1-Rounding, Rounding}
}
#declare Lego=union{
difference{
box{<0,0,0><BX,1.5,BZ>}
union{
object{SubtractFrame}
box{<Rounding,-Rounding,Rounding><BX-Rounding,LH-.1,BZ-Rounding>}
}
}
object{InCyl translate<BX/2, 0, BZ/2>}
object{InCyl translate<BX/2, 0, BZ/2+1>}
object{InCyl translate<BX/2, 0, BZ/2-1>}
object{AddFrame}
cylinder{<.5,LH,.5> <.5,CT,.5>,.2}
cylinder{<1.5,LH,.5> <1.5,CT,.5>,.2}
cylinder{<.5,LH,1.5> <.5,CT,1.5>,.2}
cylinder{<1.5,LH,1.5> <1.5,CT,1.5>,.2}
cylinder{<.5,LH,2.5> <.5,CT,2.5>,.2}
cylinder{<1.5,LH,2.5> <1.5,CT,2.5>,.2}
cylinder{<.5,LH,3.5> <.5,CT,3.5>,.2}
cylinder{<1.5,LH,3.5> <1.5,CT,3.5>,.2}
}
#declare FastClear = texture{
pigment{rgbf<1,1,1,.8>}
//finish{reflection .1 phong .2}
}
#declare LegoIOR=1.88;
#declare ClearLego=object{Lego texture{FastClear} interior{ ior LegoIOR }}
Post a reply to this message
|
|