Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Fitting an Arc to a Point and Two Tangent Lines

Date: 11/14/2004 at 23:11:39
From: Phill
Subject: Arc from point and 2 tangents

I'm wondering how to fit an arc to a point and two circles.  I have a 
picture of what I am trying to work out but I will try to describe it.
There is a vertical line segment of length 0.3 m, with a circle of
radius 0.037 m coming from the midpoint of that line, and another
circle of radius 0.104 m coming from the bottom of the segment.  I
want to fit a 3 point arc to the top of the segment and the tangents
of the two circles.  Only one curve can fit these points.

Date: 11/16/2004 at 08:20:57
From: Doctor Rick
Subject: Re: Arc from point and 2 tangents

Hi, Phill.

I'm not sure what kind of answer will fill your need.  What tools do 
you want to use to find the radius (and/or center) of the new circle? 
Do you want to construct it physically, or calculate it with algebraic 
formulas, or could you use a computer tool such as AutoCAD?

I work with AutoCAD, and it has a function to construct a circle 
tangent to three given circles.  We can convert your problem into this 
one easily.  Draw a circle of arbitrary radius (a) around the top 
endpoint, and increase the radii of the two given circles by the same 
quantity, a.  The circle tangent to these three new circles has the 
same center as the circle you seek, and its radius is "a" less than 
the radius you seek.  With your example numbers, I get a radius of 

If you want algebraic formulas, we could work one up.  I wouldn't 
write a single formula; it looks to be rather complicated, but several 
formulas to generate intermediate results would be simpler.  I'd start 
by defining the top endpoint as the origin (0,0), with the line along 
the positive x axis.  The first circle has center at (x1,0) and radius 
r1; the second circle has center at (x2,0) and radius r2.  (I am 
generalizing a bit here, not requiring that the first circle be on the 
midpoint.)  Then I can develop a formula to find the center (x,y) of 
the circle through the origin and tangent to the two circles.

Here are the details of this coordinate-geometry method.  We've got a 
point at (0,0), a circle of radius r1 with center (x1,0), and a circle 
of radius r2 with center (x2,0). 

If the circle we seek has center (x,y) and radius r, then the center 
is distance r from (0,0), distance r+r1 from (x1,0), and distance 
r+r2 from (x2,0).

The locus of points such that the difference between the distances to 
(0,0) and (x1,0) is r1 is a hyperbola.  I'll skip the derivation of 
the equation of the hyperbola, but it is

  (x - x1/2)^2/r1^2 - y^2/(x1^2 - r1^2) = 1/4

Likewise the locus of points such that the difference between the 
distances to (0,0) and (x2,0) is r2 is another hyperbola:

  (x - x2/2)^2/r2^2 - y^2/(x2^2 - r2^2) = 1/4

The center of the circle we seek is at one of the intersections of 
these hyperbolas.  Before I solve the equations simultaneously, I'm 
going to define some coefficients to simplify the work:

  b1^2 = x1^2 - r1^2
  h1   = x1/2
  b2^2 = x2^2 - r2^2
  h2   = x2/2

Now the equations are

  (x - h1)^2/r1^2 - y^2/b1^2 = 1/4
  (x - h2)^2/r2^2 - y^2/b2^2 = 1/4

I will solve each for y^2, then equate them:

  y^2 = b1^2((x - h1)^2/r1^2 - 1/4)
  y^2 = b2^2((x - h2)^2/r2^2 - 1/4)

  b1^2((x - h1)^2/r1^2 - 1/4) = b2^2((x - h2)^2/r2^2 - 1/4)


  (b1^2/r1^2)x^2 - (2h1*b1^2/r1^2)x + b1^2(h1^2/r1^2 - 1/4) =
  (b2^2/r2^2)x^2 - (2h2*b2^2/r2^2)x + b2^2(h2^2/r2^2 - 1/4)

Put in standard form:

  (b1^2/r1^2 - b2^2/r2^2)x^2 + 2(h2*b2^2/r2^2 - h1*b1^2/r1^2)x + 
    (b1^2(h1^2/r1^2 - 1/4) - b2^2(h2^2/r2^2 - 1/4)) = 0

I will define the coefficients of the quadratic as follows:

  A = b1^2/r1^2 - b2^2/r2^2
  B = 2(h2*b2^2/r2^2 - h1*b1^2/r1^2)
  C = b1^2(h1^2/r1^2 - 1/4) - b2^2(h2^2/r2^2 - 1/4)

Then the solutions are

  x = (-B + sqrt(B^2 - 4*A*C))/(2*A) or
  x = (-B - sqrt(B^2 - 4*A*C))/(2*A)

For each value of x, we have

  y = b1*sqrt((x - h1)^2/r1^2 - 1/4) or
  y = -b1*sqrt((x - h1)^2/r1^2 - 1/4)


  r = sqrt(x^2 + y^2)

That's the algorithm. When I program it into Excel with your input 
data, I get

  x = -0.081353778
  y = 0.609965325
  r = 0.615366667

This checks with the r = 0.6154 that I got using AutoCAD.  But this
algorithm will give you the numbers directly, if you put it in a
spreadsheet as I did.

- Doctor Rick, The Math Forum
Associated Topics:
College Euclidean Geometry

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994-2013 The Math Forum