POV-Ray : Newsgroups : povray.text.scene-files : Tangents between circles Server Time
28 Mar 2024 18:55:12 EDT (-0400)
  Tangents between circles (Message 11 to 19 of 19)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: jr
Subject: Re: Tangents between circles
Date: 30 Nov 2019 07:10:00
Message: <web.5de25bdc1b345bf5feeb22ff0@news.povray.org>
hi,

"Leroy" <whe### [at] gmailcom> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > your code ...
> I need to clean it up a bit.
>  Right now I have several POV files. A few for placing and making pulleys and
> then of course the mesh belt.
>  I've been thinking of making a pulley belt system along the lines of Eagle
> started. The trouble with pulleys is that they really start with the
> belt/rope/chain they use. I've been playing with the standard V belt. There is a
> lot of files! I got to go to work Now. So I'll just drop a few here to make a
> mesh belt.

problem.  'V8dat.inc' is missing, so there's no 'Bpnts' array.  commented out
the 'Macs.inc' include too, what do you need that for?


regards, jr.


Post a reply to this message

From: Leroy
Subject: Re: Tangents between circles
Date: 3 Dec 2019 16:20:01
Message: <web.5de6d1601b345bf5a564c1c0@news.povray.org>
just a little test sample while I clean up things


Post a reply to this message


Attachments:
Download 'motor2.mp4.mpg' (77 KB)

From: jr
Subject: Re: Tangents between circles
Date: 4 Dec 2019 06:10:01
Message: <web.5de793031b345bf5feeb22ff0@news.povray.org>
hi,

"Leroy" <whe### [at] gmailcom> wrote:
> just a little test sample while I clean up things

natty.  made me think of a film projector.  :-)  what if the belt was replaced
with .. transparencies and a light shone through.  should work, no?

looking forward to seeing how it's done.


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: Tangents between circles
Date: 9 Dec 2019 18:45:01
Message: <web.5deedbdf1b345bf54eec112d0@news.povray.org>
Current full WIP for your perusal.
In all it's glorious chaos.


I haven't worked much on this recently because I got sucked into hounding like a
dozen people about info on SVD, and so far I haven't gotten much except annoyed
and maybe a headache.    I think I do have some ideas - I just need to get some
time to hammer out some test code, etc.   Somehow I always have insights when
I'm trying to sleep, rather than when I'm in front of the keyboard.   :|


Post a reply to this message


Attachments:
Download 'serpentinebeltprism_dev1.pov.txt' (44 KB)

From: Thomas de Groot
Subject: Re: Tangents between circles
Date: 10 Dec 2019 02:33:55
Message: <5def4a63$1@news.povray.org>
Op 10/12/2019 om 00:42 schreef Bald Eagle:
> Somehow I always have insights when
> I'm trying to sleep, rather than when I'm in front of the keyboard.   :|
> 

Ha! /That/, is a quite common phenomenon indeed. ;-)

-- 
Thomas


Post a reply to this message

From: jr
Subject: Re: Tangents between circles
Date: 26 Dec 2019 19:55:00
Message: <web.5e05550e1b345bf58c662f470@news.povray.org>
hi,

sorry for the delay, not forgotten, just occupied with fussing over a new
machine.  :-)  plus RL stuff.

"Bald Eagle" <cre### [at] netscapenet> wrote:
> Current full WIP for your perusal.
> In all it's glorious chaos.

phew, and I'm floundering..  :-(  cannot see how you've arrived at the data in
'CircleArray' elements 6 + 8/9.

(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'?)

ideally, I would like only to input, per circle, centre, radius, and
(counter)clockwise direction.  choice of tangents and which part of
circumference to draw should be derived.

for instance, say three small circles forming a "nice" triangle.  if all three
run clockwise, it should render a triangular shape with rounded corners, but if
they run counterclockwise the triangle should have cut-out corners (bit like a
jigsaw piece).  iiuc, "inner tangents" would come into play when the next
circle's direction is the opposite of the current.

well, that is the idea(l).  Q - can you provide guidance, please?

this is just for drawing prisms, getting an understanding, really; ignore
pulleys for now.

and one more question, a prism made using just two circles, will that be doable
(wrt comment above 'ArrayIsLinear')?

thanks.

> I haven't worked much on this recently because I got sucked into hounding like a
> dozen people about info on SVD, and so far I haven't gotten much except annoyed
> and maybe a headache.    I think I do have some ideas - I just need to get some
> time to hammer out some test code, etc.   Somehow I always have insights when
> I'm trying to sleep, rather than when I'm in front of the keyboard.   :|

:-)

(the program working to satisfaction now, I take it)


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: Tangents between circles
Date: 26 Dec 2019 20:20:00
Message: <web.5e055c201b345bf54eec112d0@news.povray.org>
"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.

> (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

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.

> 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, that is the idea(l).  Q - can you provide guidance, please?

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.

> this is just for drawing prisms, getting an understanding, really; ignore
> pulleys for now.
>
> 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.


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...


Post a reply to this message

From: jr
Subject: Re: Tangents between circles
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

From: Bald Eagle
Subject: Re: Tangents between circles
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
two.


> 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

<<< Previous 10 Messages Goto Initial 10 Messages

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