Midpoints of segments between points on nonconcentric circles

Mathematica demonstration
6 April 2002
James T. Smith
Department of Mathematics
San Francisco State University
smith@math.sfsu.edu
http://math.sfsu.edu/smith

Mathematica is the leading software product for advanced mathematics.
I use it here 
•	for presentation, and
•	to investigate a problem and suggest a solution.

Mathematica is introduced first in our Calculus II course, and
used in many more advanced courses and student projects.
It's installed for student use University-wide.

All these students use simple features to investigate problems.
Some learn advanced features for presentations.

I'll describe what I'm doing when it's simple, but
skip details when it's advanced.

Problem context

Centers and radii of two nonconcentric circles (simple):

C1 = {0, 0}; r1 = 1;
C2 = {3, 0}; r2 = 3/2;

Example points on them (simple):

θ = 30  °;
P1 = {r1*Cos[θ], 
        r1*Sin[θ]};   P2 = {3 + r2*Cos[θ], 
        r2*Sin[θ]};

Draw examples (advanced):

Needs["Graphics`MultipleListPlot`"];
Needs["Graphics`Colors`"];
SetOptions[{Graphics, MultipleListPlot}, 
        AspectRatio -> Automatic]; 
SetOptions[ListPlot, 
        DisplayFunction -> Identity];
G = 
        MultipleListPlot[{C1, P1}, {C2, P2}, PlotJoined -> True, 
          PlotRange -> {{-2, 5}, {-2, 2}}];

Create and draw the circles (simple):

Circles = {Circle[C1, r1], 
          Circle[C2, r2]};
Show[G, Graphics[Circles]];

I no longer need the scales, centers or radii (simple):

G1 = 
        Show[Graphics[{Circles, 
Point[P1], 
              Point[P2]}]];

Draw the segment between the points, and
emphasize its midpoint (simple):

Show[G1, 
        Graphics[{Line[{P1, P2}], 
PointSize[ .02], 
            Magenta, Point[(P1 + P2)/2]}]];

Problem statement

Describe mathematically the set  ℳ  of all midpoints
determined by points on the two circles.

Problems similar to this arise in
•	designing rotating machinery, or
•	locating a purple point known to be equidistant
	from two observers known to be somewhere on the circles.

Experiment by hand

I've no quick idea what  ℳ  is, so I'll experiment with a yardstick.
(Plot some midpoints with ruler and light-pen.)

That's tedious.  With only few midpoints, I've still no idea.

Experiment with software

I'll ask Mathematica for many pseudo-random points on the circles,
plot their midpoints, and see what turns purple!
Maybe I can describe it mathematically.

I choose  n,  the number of points on each circle, 
only a few at first, so I can see them.
Then I make a table of  n  random angles (simple):

n = 4;
θ1 = Table[Random[Real, 360], {n}]

Re-execute that if necessary to get well-spaced angles.
I use them to make a table of points on the first circle
(simple, but I have to know how to manipulate tables):

{Cos[(θ1) °], 
      Sin[(θ1) °]} 
P1 = Transpose[%]

ListPlot[P1];
G2 = Show[Graphics[Circles], %];

Same for the other circle.  Re-execute if necessary.

θ2 = Table[Random[Real, 360], {n}];
{3 + r2*Cos[(θ2) °], 
        r2*Sin[(θ2) °]};
P2 = Transpose[%];
ListPlot[P2];
G3 = Show[G2, %];

Display the segments between corresponding points.
Not necessary for the experiment, but
nice for the presentation (advanced):

Transpose[{P1, P2}];
Graphics[Thread[Line[%]]];
G4 = Show[G3, %];

Display their midpoints (simple):

ℳ = (P1 + P2)/2; 
ListPlot[ℳ, PlotStyle -> Magenta];
G5 = Show[G4, %];

Now, do this again with somewhat larger  n.
That still doesn't grab you, does it?
I can increase  n  further.
To cut the output,
I modified the commands slightly (simple):

n = 40;
θ1 = 
        Table[Random[Real, 360], {n}];
{Cos[(θ1) °], 
        Sin[(θ1) °]} ;
P1 = Transpose[%];
θ2 = Table[Random[Real, 360], {n}];
{3 + r2*Cos[(θ2) °], 
        r2*Sin[(θ2) °]};
P2 = Transpose[%];
ℳ = (P1 + P2)/2;
SetOptions[{ListPlot, Plot}, 
        DisplayFunction -> Identity];
G5 = ListPlot[P1];
G6 = ListPlot[P2];
G7 = 
        ListPlot[ℳ, PlotStyle -> Magenta];
G8 = 
        Show[Graphics[Circles], G5, G6, G7, 
          DisplayFunction -> $DisplayFunction];

Increase  n  still more!
Aha!

Analysis and more experimentation

I need expressions for the center and the inner and outer radii of the ring.

The leftmost point of the ring is the average of the leftmost points on the original circles.  It has coordinate  (-r1 + 3 - r2)/2 = 1/4.

The rightmost point of the ring is the average of the rightmost points on the original circles.  It has coordinate  (r1 + 3 + r2)/2 = 11/4.

The coordinate of the center of the ring is the average of these,
(1/4 + 11/4)/2 = 3/2.

The ring's outer radius is the difference of the center and leftmost coordinates,  3/2 - 1/4 = 5/4.

It's simple to check those:

Show[G8, Axes -> True];

Similar reasoning will yield the inner radius,  1/4.

To complete the analysis, I'd have to prove this Theorem:
•	every midpoint, not just these, lies within the specified ring, and
•	every point in the ring is the midpoint of some such segment.

The previous display suggests,
the ring is related to the circles' common tangents.

(Draw the tangents on with the light-pen.)

It's simple to use Mathematica to find where they touch the circles, and plot them.

The circles and a common tangent  𝒯  have equations
(x^2)+(y^2) = 1,  (x - ((3))^2) + (y^2) = (r2^2),  and  y = mx + b.

I use six unknowns:
•	m  and  b,  
•	the coordinates  x1, y1  where  𝒯  touches the left circle, and
•	the coordinates  x2, y2  where  𝒯  touches the right circle.

Clear[m, b, x1, y1, x2, y2];

The unknowns satisfy these (simple, but requires analytic geometry):

Equations = {(x1^2) + (y1^2) == 1, 
          y1 == 
            m*x1 + b, 
(((x2 - 3))^2) + (y2^2) == 
            (r2^2), y2 == 
            m*x2 + b, 
y1/x1 == -1/m, 
          y2/(x2 - 3) == -1/m};

The first two say   (x1,y1)  lies on  𝒯  and the left circle.
The next two say   (x2,y2)  lies on  𝒯  and the right circle.
The last two say the radii at those points are  perpendicular to  𝒯 .

Mathematica can solve these six equations in six unknowns (simple):

Solve[Equations, {m, b, x1, y1, x2, y2}]

I only need the  m  and  b  values from this mess.
There are four pairs, corresponding to
the four common tangents:

m1 = +5/Sqrt[11];   b1 = -6/
        Sqrt[11];
m2 = -5/Sqrt[11];   b2 = +6/
        Sqrt[11];
m3 = +1/Sqrt[35];   b3 = +6/
        Sqrt[35];
m4 = -1/Sqrt[35];  b4 = -6/
        Sqrt[35];

Display the tangents as function graphs (simple):

Functions = {m1*x + b1, m2*x + b2, 
m3*x + b3, 
          m4*x + b4};
Plot[Evaluate[Functions], {x, -1, 4.5}, 
        PlotStyle -> Thickness[ .005]];
Show[G8, %, PlotRange -> {-2, 2}];

This display suggested how I could prove the Theorem: 
the set  ℳ  of midpoints is precisely this ring.

The tangents represent limiting positions of the segments
whose midpoints form  ℳ .

But the proof itself is another story.

Thank you for your interest and attention!