|
|
"Dan Johnson" <zap### [at] hotmailcom> wrote in message
news:3B371282.7C2E7260@hotmail.com...
> GrndAdmThrawn wrote:
> >
> > I'm wondering how you would like take two cylinder at like 90 degree or
45
> > degree then put the end together but the end part would stick out of
each
> > others, how would u cut those end part off and delete it so the pipe
like
> > fits together without any gap or junk sticking out??
> >
> You could use an intersection between an infinite cylinder from
> shapes.inc and a plane. I usually just stick in a sphere to close the
> gap.
Or use blob maybe. For components in the blob just two cylinders would do
okay, as in:
light_source {<1,1,-10>,1}
camera {location -5*z angle 60 look_at y}
blob {
cylinder {2*x,0,.5,1 rotate 45*z}
cylinder {2*x,0,.5,1 rotate 90*z}
threshold 0.001
pigment {rgb 1}
rotate 22.5*z
}
Bob H.
Post a reply to this message
|
|
|
|
Surely simply using a CSG difference between the cylinder and a box
would
work fine? You could either translate the cylinders to their final
positions, then chop off the box, or use a bit of trig if you wanted to
chop
first and move later.
I imaging this method should render faster than the other two
suggestions so
far. Permission to quote me on that is witheld, though :)
> I'm wondering how you would like take two cylinder at like 90 degree
or 45
> degree then put the end together but the end part would stick out of
each
> others, how would u cut those end part off and delete it so the pipe
like
> fits together without any gap or junk sticking out??
>
> kind of like
>
> /|\
> / / \ \
> / / \ \
>
> thanks in advance
Post a reply to this message
|
|
|
|
GrndAdmThrawn wrote:
>
> I'm wondering how you would like take two cylinder at like 90 degree or 45
> degree then put the end together but the end part would stick out of each
> others, how would u cut those end part off and delete it so the pipe like
> fits together without any gap or junk sticking out??
If you want a sharp bend you could do it like this:
#declare cut_cylinder=difference { // cylinder cut at 45deg
cylinder { <-100, 0, 0>, <20, 0, 0>, 5 }
plane {-x, 0 rotate <0, 45, 0> }
}
#declare deg90_cylinder=union{
object { cut_cylinder }
object { cut_cylinder rotate <0, -90, 0> scale <-1, 1, 1> }
}
If you want a softer bend, you can just connect two cylinders with a
sphere like this:
#declare soft90deg_cylinder=union{
cylinder { <-100, 0, 0>, <0, 0, 0>, 5 }
sphere { <0, 0, 0>, 5 }
cylinder { <0, 0, 0>, <0, 0, -100>, 5 }
}
/Ib
------------------------------
Gallery: http://www.ibras.dk
Post a reply to this message
|
|