what is the slope of a line that 1) can rotate around a point, and 2) its reflection from a circle has a specific direction

161 Views Asked by At

I have a question.

The figure of the problem:

I have a line that intercepts a circle. the line (in vector form) has equation i + td , where i is the direction of the line, d is on point of the line and t is the coefficient of the line. The line intercepts a circle in point p and it is reflected. the radius of the circle R is known. the reflected line has equation r + l p, where r is the direction of the reflected line, and l is the coeff. of the line.

I am able to rotate the incident line around d (changing i) and I want that the reflected line has a specific direction r_need that I know. My question is: how can I calculate i in order to obtain r_need. In other words, what is the direction of the incident line in order to have the reflected one with the slope that I decide before?

thanks!

1

There are 1 best solutions below

1
On

Let's call $c$ the center of the circle. Let's also assume that $i$ and $s$ (my name for $r_{need}$) are both unit vectors.

Then you need to find $p$ with two properties:

  1. $(p-c) \cdot i = (p-c) \cdot r$
  2. $(p-c) \cdot (p-r) = R$

where $R$ is the circle's radius. Rewrite to get

  1. $(p-c) \cdot (i-r) = 0$

and suddenly it's easy: Let $h = (i-r)$ and let $k = rot(h)$, where "rot" means 'rotate 90 degrees'. Then $p = c \pm \frac{R}{\|k\|} k$.

This gives two answers; the other is the diametrically opposite point on the circle in your second drawing. You'll probably want to compute both and decide which one corresponds to an external rather than an internal reflection.