|
![](/i/fill.gif) |
"JimT" <nomail@nomail> wrote:
> As noted, connecting two arbitrarily placed cylinders by a torus segment isn't
> possible except as a rather special case.
>
> The simplest object that is guaranteed to connect two cylinders is a Bezier
> spline which has four control points. p1 and p4 are the cylinder end centres. p2
> is such that the vector p2-p1 is along the first cylinder axis. Similarly p4-p3
> and the second cylinder axis.
>
> I have a Bezier sweep macro. Joining cylinders of different radii is also
> possible
>
> There is some freedom in choosing |p2-p1| and |p4-p3| to make sure kinks and
> loops don't appear.
>
> The Bezier spline has the tetrahedron with vertices p1,p2,p3,p4 as its convex
> hull, which might help with removing intersections.
>
> However, generating a lot of connected cylinders and ensuring that nothing
> intersects would be rather difficult - in general it isn't possible. Think of
> six cylinders surrounding a seventh. Join opposite of cylinders (using the
> |p2-p1|, |p4-p3| freedom to remove any intersections but keeping the joining
> Bezier sweeps as close as possible). There would be no path from the centre
> cylinder to any other.
Detecting this and rerouting through a hole with a bendy part, or possibly
killing that cylinder? Elimination of violating components is acceptable.
> Trying to allow for intersections (with no guarantee of success) by splitting
> single Bezier sweeps into multiple sweeps would be possible.
>
> I've never tried to work out whether two Bezier sweeps intersect. Feels like an
> interesting problem, but it must have been looked at.
I love interesting problems. :) I agree, there must have been someone who
encountered a flavor of this problem at some point within the scope of some
discipline or another. However I doubt they are a Pov-NG user. :p
> If you want the macro, I can send it.
Please do, thanks! :)
Ian
Post a reply to this message
|
![](/i/fill.gif) |