Shortest Path between Two Points in the Unit Disk Reflecting off the Circumference

Given two points within the unit disk labeled (in green) and (in red), what is the shortest path between the two points that reflects off the unit circle? You can drag the two points.
The central angle between the two points is . The angle from the axis to is . The shortest path that touches the unit circle is at angle .



  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The shortest path between two points in the unit disk that reflects off the circumference is composed of two straight line segments. The problem can be simplified by choosing the coordinate system carefully. We define the axis along the position of the starting point: , and define the point of intersection by the angle from the axis , and the final point by a radius and angle , . Then define a symmetry point about of line named .
Then the length of the two line segments is
which is minimized by choosing an appropriate value. This equation can be simplified to
The length of the two line segments as a function of is drawn in the right plot.
There are several simple solutions. If is 1 or is 0 or is 0, the optimal angle is 0. If is 1 or is 0, the optimal angle is .
Label the origin . The optimal solution shows that the angle (from the origin to to ) is the same as the angle (from the origin to to ).
We name these angles . This can be proved by drawing an ellipse whose foci are and . When the ellipse is tangent to the circle, the point of tangency is exactly .
Since the distance from the origin to is always 1, we can set up three equalities using the law of sines:
From triangle : .
From triangle : .
If we mirror the point about the axis and label this point , from triangle : .
Simplifying this system of equations results in: .
Solving this last equation results in a quartic solution that has a closed-form solution with four roots, each of which can be either a clockwise or a counterclockwise rotation , depending on the sign of , with . We evaluate each and select the solution that results in the shortest length path.
Note that the optimal path satisfies the law of reflection off the unit circle, with angle of incidence equal to angle of reflection.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+