0

I am working on a track editor and have found myself in a situation where I need to define two touching circles. Ideally I would like to know the centre point, and radius of these circles.

The information I have is a point on the circumference of each of the circles, and the tangent to the circle at that point.

On my own I have figured out that if I know the tangents at those points I know the lines on which the centre points must lie.

C1 is the centre of the first circle I am looking for
P1 is a point on the circumference of the circle at which I know the tangent
A is the normal to the tangent that I know at P1

C2 is the centre of the second circle I am looking for
P2 is a point on the circumference of the circle at which I know the tangent
B is the normal to the tangent that I know at P2

C1 = P1 - t1 * A  
C2 = P2 - t2 * B

I also know that the distance between the two centres will be equal to the sum of the distance of the centres from the points on the circumference.

|C1 - P1| + |C2 - P2| = |C1 - C2|

I also want abs( |t1*A| - |t2*B| ) to be kept to a minimum.

user1118321
  • 25,567
  • 4
  • 55
  • 86
  • Looks like you have a system of equations with three equations and four unknowns; not a good sign. I can't math right now, but you should draw a carefully-labeled diagram, sometimes that helps clarify the problem, and certainly helps communicate it. You might want to try http://math.stackexchange.com/ too, instead since it's not really a programming question. – Tim Sylvester Apr 04 '11 at 01:13

1 Answers1

0

If you have only the tangent vectors and the point, there's not enough information. You need at least 2 more points, one more for each circle, otherwise t1 and t2 can be any real.
(By the way, A = -B) Disregard, I assumed that circles are not overlapping. Either way, we cannot know how large they are (and hence where the center points are) without knowing more information.

  • Thank you. When I look over what I am trying to achieve here I realise that what I want are the two circles such that the difference between the length of the radii are kept to a minimum. – Chad Edwards Apr 04 '11 at 01:55