POV-Ray : Newsgroups : povray.text.scene-files : Tangents between circles : Re: Tangents between circles Server Time
24 Oct 2021 02:04:58 EDT (-0400)
  Re: Tangents between circles  
From: jr
Date: 26 Dec 2019 21:45:01
Message: <web.5e056fc91b345bf58c662f470@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > phew, and I'm floundering..  :-(  cannot see how you've arrived at the data in
> > 'CircleArray' elements 6 + 8/9.
> An initial circle array should have everything defined with _All or _Both to
> render a starting image to starting picking tangents and arcs.

ah, that is multi-pass.

> > (part of the confusion is that calculations and representation are so
> > intertwined, like when you use a colour ([n][6]) to select a tangent.  and what
> > is special about the order of indices in 'TangentList'?)
>
> All of the calculations should be nice and neat and tidy in the upper part of
> the scene file. BezierArcs and analyticalTangents

they are, and I've abstracted the "do work" macros in an .inc.  still 700+ lines
remaining after.  :-)

> The TangentList array takes the [named] numerical values that you use to select
> the colored tangent lines and "converts"/indexes that to which tangents in the
> AnalyticalTangent macro output array they correspond to.

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

> > choice of tangents and which part of
> > circumference to draw should be derived.
> I had this idea in mind - but it's never going to be quite that simple, and the
> logic involved in doing that ---- it's going to be challenging.   I had started
> to look into serpentine belt design software to see if I could deivine some
> rules or see some code ---- but that is a LONG tangent [sic] that I thought best
> not to pursue.  "Get the PRISM rendered." was the goal - and that took a mighty
> effort.
> ...
> Well, you'd have to flowchart it out and see what happens.  What happens if the
> circles aren't laid out in the array just like that?  What happens if they
> overlap or one is inside the other (just by mistake).  How do you determine
> which tangent is the "outside" one - to give you the intended, desired "convex
> hull" truncated/rounded triangle that we're talking about?  That seemed like an
> unnecessary mountain to climb over.

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.  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 suspect the climbing over is worth it though, given the existing "toolbox" of
macros.  you've done most of the sweat-work, now it's more (re)organising code
and writing "wrappers".

> > ...
> > and one more question, a prism made using just two circles, will that be doable
> > (wrt comment above 'ArrayIsLinear')?
> That was the idea.  I put that in there when considering just that - but I don't
> know if I tested that out and saw if it worked properly or not.

ok.

> Got some residual holiday / RL stuff to get out of the way and hopefully I willl
> have a block of uninterrupted time and enough of an energy spurt to make another
> meaningful contribution to this.
> I would also like to see what Leroy has come up with - I'm not sure if his stuff
> only runs under Windows or what...

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.


regards, jr.


Post a reply to this message

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