There is a sphere located in a point s with radius r. The Sphere is a perfect mirror. If i'm sitting in the point c, I want to cast a ray to the sphere such that I hit the point p after bouncing in the surface of the sphere. For this, I want to find the point x.

I've had some trouble formulating this problem.

How can I find x?

The point p is always visible (in the reflection) from c.

A formulation in 2D would be enough to begin with.

enter image description here


The lines xc and xp do not have the same length. The line sx should be the bisector of the angle xcp.

I need to solve this problem analytically, can't use numeric methods to approximate the solution.

  • $\begingroup$ You mean angle $cxp?$ $\endgroup$ – Narasimham Feb 5 '16 at 19:17
  • $\begingroup$ @Narasimham yes $\endgroup$ – Xocoatzin Feb 5 '16 at 22:00

Find the bisector of $\angle{CSP}$, then point X is the intersection of this bisector with the circle/sphere.

Note: Above simple answer only works when point C and P are symmetric to center S.

In general, the vector $\vec{SX}$ bisects $\angle{CXP}$ (not $\angle{CSP}$). So, to find point X, represented as $X=S+(rcost,rsint)$, we have to solve for the following equation:

$\frac{\overrightarrow{XC}}{|\overrightarrow{XC}|}\cdot \vec{n} = \frac{\overrightarrow{XP}}{|\overrightarrow{XP}|}\cdot \vec{n} $

, where $\vec{n}=\frac{\overrightarrow{SX}}{|\overrightarrow{SX}|}$

It is not easy to solve for point X from this equation analytically. But you can do that numerically.

  • $\begingroup$ It is not the bisector as you said, because the lines SC and SP are not guaranteed to have the same length. $\endgroup$ – Xocoatzin Jan 12 '15 at 17:00
  • $\begingroup$ You are right. My answer only works when point C and P are symmetric to the center S. $\endgroup$ – fang Jan 12 '15 at 18:21
  • $\begingroup$ I revised my answer accordingly. $\endgroup$ – fang Jan 12 '15 at 19:00

It seems that “Computing a Point of Reflection on a Sphere” was done by David Eberly and it needs to compute roots of a quartic polynomial.

  • $\begingroup$ The quartic is surprising. Physically, it seems clear that there are only two solutions -- one with external reflection (which is the one we want) and one with internal reflection. I wonder if one can show that the quartic has a quadratic factor that is never zero. $\endgroup$ – bubba Nov 6 '15 at 9:20

Hint. Find line $l_1$ that goes through $C$ and $X$, $l_2$ through $P$ and $X$ and tangent line $l_3$ to the circle in $X$. Then write that the angle between $l_1$ and $l_3$ is equal to the angle between $l_2$ and $l_3$.

  • $\begingroup$ This is a straight-forward enough problem that you might want to jump to the 3-dimensional case, but good idea. $\endgroup$ – nomen Jan 16 '15 at 2:01

It can be shown that the point of specular reflection on the sphere provided two focal points lying outside of it is always given by a quartic polynomial equation. In the case where all solutions are distinct, each solution corresponds respectively to an external, internal and external-internal or internal-external reflection. For the construction of an approximation of the point of interest using a geometric algorithm employing compass and ruler constructions and the error associated see https://arxiv.org/abs/1703.06768


This is well known as Alhazen's problem.


here is my attempt at a solution for the two dimensional case. i will take the circle to be centred at the origin and have radius $r.$ i will take $c = (c_1, c_2)^T, p = (p_1, p+2)^T, x = (r\cos t, r\sin t)^T$ we will determine $t$ subject to the constraint that the line $OS$ bisects $\angle CSP$

$$ \dfrac{ c\cdot x - r}{p \cdot x - r}= \dfrac{(c-x) \cdot x}{(p-x) \cdot x} = \dfrac{\lvert c - x \rvert \lvert x \rvert \cos \angle CSO}{ \lvert p - x \rvert \lvert x \rvert \cos \angle PSO} = \dfrac{\lvert c - x \rvert}{ \lvert p - x \rvert} $$

we need to solve $$\dfrac{ c\cdot x - r}{p \cdot x - r}= \dfrac{\lvert c - x \rvert}{ \lvert p - x \rvert} \text{ for } t. \tag 1$$

let $c.x = r|c|\cos(t+\alpha), p.x = r|p|\cos(t+\beta).$ then the previous equation (1) becomes $${\left( \dfrac{|c|\cos(t+\alpha)}{|p|\cos(t + \beta)} \right)}^2 = \dfrac{|c|^2 - 2r|c|\cos(t + \alpha)+r^2}{|p|^2 - 2r|p|\cos(t + \beta)+r^2} \tag 2$$

  • $\begingroup$ Thanks for your answer, but the radius should be arbitrary, can't make it 1 for no reason. $\endgroup$ – Xocoatzin Jan 12 '15 at 17:32
  • $\begingroup$ @Xocoatzin, i fixed the radius to be $r$ not that it makes much difference. you can always set up your coordinate system and the units so that circle has radius 1. $\endgroup$ – abel Jan 12 '15 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.