How would I find the vector needed (m) to reflect a ray in a desired direction (r) given the normal (n)

18 Views Asked by At

Is it possible to rearrange the equation: n-(2*(n.m)*m)=r to solve for m where n and r are both vectors? If not, is there a way to guess the answer?

1

There are 1 best solutions below

0
On

$$2(n \cdot m)m = n-r$$ So $m$ has to be some constant multiplied by $n-r$. You only care about the unit vector, so this tells you the answer, if an answer exists, unless $n-r = 0$, in which case any vector perpendicular to $n$ works.