POV-Ray : Newsgroups : povray.text.scene-files : Tangents between circles : Re: Tangents between circles Server Time
20 Apr 2024 02:56:23 EDT (-0400)
  Re: Tangents between circles  
From: jr
Date: 20 Nov 2019 16:45:00
Message: <web.5dd5b2d31b345bf5feeb22ff0@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> Right-o.   I just got a quick demo scene posted before it dropped off the
> back-burner.
> ...
> I'd say that the best help at the moment might be to just look it over and do a
> parallel implementation, starting from what I posted.   That would give me new
> ideas for how to process the data, and other things with what to do with the
> results that I might not have thought of yet.
>
> Also, asking any questions you may have about specific bits of the code would
> help me document it, and in the process re-read and re-think what I've already
> done.

one question is: in the #for() loop near bottom, you test for IFlag and OFlag.
naively, given two circles A + B which do not touch/overlap, you always get 4
tangents, no?  by mandating "sane" scenarios you might be able to get rid of
some conditional code.

the comments in the code suggest that you can "classify" the tangents (order +
direction) and used colour to see that info; is that code available too?

> Certainly I'd love to work out the logic of animating it, and doing something
> like a toothed belt or chain to run along gears or sprockets.

given knowledge of radius of A, and the number of degrees it revolves from one
frame to the next, it would just require to map that length of arc to B to get
the corresponding angle (not that I could actually do it).

provides all needed info when combined with the frame number.

> I haven't done much pathological case testing, because it's already a miracle
> that it even works at all.

I hope I can make some headway understanding the code, and hopefully learn how
to "assemble" the correct tangents into a belt or cable.  I probably won't be
able to avoid stumbling into problems.  :-)


regards, jr.


Post a reply to this message

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