POV-Ray : Newsgroups : povray.general : Closest points on two circles Server Time
26 Dec 2024 14:33:55 EST (-0500)
  Closest points on two circles (Message 1 to 10 of 25)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Edward Coffey
Subject: Closest points on two circles
Date: 25 Mar 2003 07:22:37
Message: <3E804D3B.3070301@alphalink.com.au>
If this has been covered before then mea culpa, but I have searched the 
links collection and the internet at large to no avail.

Does anyone possess a macro for calculating the points defining the 
shortest path between two circles (not discs, circles) given the normal, 
centre and radius of each circle, or some algorithm/formula from which 
such a macro may be easily derived?

I am led to believe that the calculations involved in solving this 
problem are reasonably difficult, so don't knock yourselves out trying 
to work out a solution for me, unless you enjoy that kind of thing :?) 
I'm really just hoping that someone happens to have the appropriate 
information just lying around.

Thanks, Ed.


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Closest points on two circles
Date: 25 Mar 2003 08:47:40
Message: <3e805dfc$1@news.povray.org>
To get the vector for spheres:

#declare centerA=<10,5.0,-5.50>;
#declare radiusA=3.1415;
#declare centerB=<1.0,-45.0,15.50>;
#declare radiusB=0.1415;

#declare 1stpoint=  centerA+ radiusA*vnormalize(centerB-centerA);
#declare 2ndpoint=  centerB+ radiusB*vnormalize(centerA-centerB);

Then the vector in question is between 1stpoint and 2ndpoint.
A treatment for "circles"  is the same as that for spheres with coplanar
centers.


Post a reply to this message

From: Edward Coffey
Subject: Re: Closest points on two circles
Date: 25 Mar 2003 08:53:44
Message: <3E806296.6090201@alphalink.com.au>
Greg M. Johnson wrote:
> To get the vector for spheres:
> 
> #declare centerA=<10,5.0,-5.50>;
> #declare radiusA=3.1415;
> #declare centerB=<1.0,-45.0,15.50>;
> #declare radiusB=0.1415;
> 
> #declare 1stpoint=  centerA+ radiusA*vnormalize(centerB-centerA);
> #declare 2ndpoint=  centerB+ radiusB*vnormalize(centerA-centerB);
> 
> Then the vector in question is between 1stpoint and 2ndpoint.
> A treatment for "circles"  is the same as that for spheres with coplanar
> centers.

Thanks, but my purpose requires a solution for pairs of circles with any 
orientation and position relative to one another, not just coplanar circles.


Post a reply to this message

From: Sir Charles W  Shults III
Subject: Re: Closest points on two circles
Date: 25 Mar 2003 08:57:22
Message: <3e806042$1@news.povray.org>
To find the closest points on any pair of circles, simply draw a line from
center to center.  Then locate the points on each circle that the line passes
through.

Cheers!

Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip


Post a reply to this message

From: ABX
Subject: Re: Closest points on two circles
Date: 25 Mar 2003 08:57:59
Message: <fqn08vov70hujm7t7ihaepp17kaerr6kpl@4ax.com>
On Tue, 25 Mar 2003 08:47:08 -0500, "Greg M. Johnson" <gregj:-)565### [at] aolcom>
wrote:
> To get the vector for spheres:
>
> #declare centerA=<10,5.0,-5.50>;
> #declare radiusA=3.1415;
> #declare centerB=<1.0,-45.0,15.50>;
> #declare radiusB=0.1415;
>
> #declare 1stpoint=  centerA+ radiusA*vnormalize(centerB-centerA);
> #declare 2ndpoint=  centerB+ radiusB*vnormalize(centerA-centerB);
>
> Then the vector in question is between 1stpoint and 2ndpoint.

No. Being in 2D consider circle located at <0,0> with radius 2 and circle
located at <3,0> with the same radius 2. Closest points between circles are
located in intersections which are not between centers.

ABX


Post a reply to this message

From: Edward Coffey
Subject: Re: Closest points on two circles
Date: 25 Mar 2003 09:00:27
Message: <3E80642A.3040301@alphalink.com.au>
Sir Charles W. Shults III wrote:
>     To find the closest points on any pair of circles, simply draw a line from
> center to center.  Then locate the points on each circle that the line passes
> through.

This only works when both your circles are sitting on the same plane, 
not when they may take any orientation in 3D space.


Post a reply to this message

From: Edward Coffey
Subject: Re: Closest points on two circles
Date: 25 Mar 2003 09:03:38
Message: <3E8064E7.1090800@alphalink.com.au>
ABX wrote:
> No. Being in 2D consider circle located at <0,0> with radius 2 and circle
> located at <3,0> with the same radius 2. Closest points between circles are
> located in intersections which are not between centers.
> 
> ABX

Quite so, and furthermore my circles are not in 2D space, they are in 3D 
space. However I'm happy enough not to consider cases where they 
intersect one another.


Post a reply to this message

From: ABX
Subject: Re: Closest points on two circles
Date: 25 Mar 2003 09:09:15
Message: <0do08v0h6ucslf7mli0f0dfo1q8lv4eoo9@4ax.com>
On Wed, 26 Mar 2003 01:14:02 +1100, Edward Coffey <eco### [at] alphalinkcomau>
wrote:
> This only works when both your circles are sitting on the same plane, 
> not when they may take any orientation in 3D space.

You have to define distance as function and then find where it has minimum.

http://mathworld.wolfram.com/Minimum.html

ABX


Post a reply to this message

From: Edward Coffey
Subject: Re: Closest points on two circles
Date: 25 Mar 2003 09:10:23
Message: <3E80667D.9040506@alphalink.com.au>
Edward Coffey wrote:
...
> Does anyone possess a macro for calculating the points defining the 
> shortest path between two circles (not discs, circles)
...

Sorry, I should have been more clear - when I specified that I was 
dealing with circles not discs I did not mean to imply that I was 
working in a 2D space, only that the path had to connect to the 
circumference, not to any point within a disc.
My circles exist in 3D space and may take any position or orientation 
relative to one another.


Post a reply to this message

From: Edward Coffey
Subject: Re: Closest points on two circles
Date: 25 Mar 2003 09:19:19
Message: <3E806895.2050008@alphalink.com.au>
ABX wrote:
...
> You have to define distance as function and then find where it has minimum.
...

Yes, but as I stated in my original post, the mathematics of this is 
quite complex, it's not as though you're finding the minimum of a 
quadratic equation with one variable. Certainly the mathematics of it is 
quite beyond my abilities, which is why I haven't asked anyone to solve 
it, simply that if they happen to have access to a solution (or if 
they're math mad and really want to create their own solution) to post 
it here.


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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