POV-Ray : Newsgroups : povray.text.scene-files : Tangents between circles : Re: Tangents between circles Server Time
15 Jul 2024 08:29:06 EDT (-0400)
  Re: Tangents between circles  
From: Bald Eagle
Date: 27 Dec 2019 20:05:01
Message: <web.5e06a9cf1b345bf54eec112d0@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> ah, that is multi-pass.

Right.  The idea was to have all of the rounded parts in place, the macros puked
out every possible tangent, and then you picked which one you wanted.

> in other words, the values index the 'LastTangent' + 'CurrentTangent' arrays?

Right.  So if you follow the renders in the earlier development posts, you can't
really pick an arc until 2 tangents are picked.  Then one those two tangent line
endpoints are defined, you can then pick one or the other arc connecting the

> from my (obviously) naive point of view, I thought re overlap, the circles are
> in a plane and overlap can be calculated given centres and radii are known.  in
> a macro, that would be part of checking the arguments beforehand.

I think I already did that part and output some stuff to the debug stream.
There are also some flags that get set/unset to skip over nonexistent tangents
that would throw an error in the calculations.

> wrt
> determining which tangent, it should be selected from the combination of
> respective directions and centres; I assume that one can deal in "quadrants" and
> perhaps use some pre-calculated lookup table?

I don't really know what you mean.  I'd need pictures or something.  It would
probably be easy if all of your circle centers were describing a convex hull,
but once you get a concave spot, then it gets super tricky.
Just calculate a "centroid" of sorts by averaging all the center coordinates,
and pick which external tangent based on which endpoint is farthest away from
the centroid.

> yeah, he posted a "teaser" (ie some core (array) missing).  I think it's an
> ..inc, anyway, too will have a look in the next few days or so.

I just downloaded it, and haven't extracted the file to see what it is.

Post a reply to this message

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