POV-Ray : Newsgroups : povray.general : Connecting cylinders with chunks of a torus vs. sphere_sweep point cloud. : Re: Connecting cylinders with chunks of a torus vs. sphere_sweep point clou= Server Time
29 Jul 2024 10:24:44 EDT (-0400)
  Re: Connecting cylinders with chunks of a torus vs. sphere_sweep point clou=  
From: [GDS|Entropy]
Date: 20 Oct 2011 12:35:00
Message: <web.4ea04c932498489777e50e540@news.povray.org>
"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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.