- #1
VeryBadAtMath
- 2
- 0
An Example Scenario:
A particle moves at 32° and collides with a wall. This wall is rectangular in nature, which means that there is both horizontal and vertical sides.
On a horizontal tangent, it would work like this (sorry for ugly, not-to-scale diagrams):
[PLAIN]http://img198.imageshack.us/img198/7808/questionsc.jpg
(reflects at 148°)
However, on a vertical tangent it would reflect like this:
[PLAIN]http://img808.imageshack.us/img808/2064/question2.png
(reflects at 328°)
This means that:
It's lame to have two different formulas, so is there a general formula for the reflectionDirection that works with both vertical and horizontal tangents? It's fine if it uses radians instead of degrees.
A particle moves at 32° and collides with a wall. This wall is rectangular in nature, which means that there is both horizontal and vertical sides.
On a horizontal tangent, it would work like this (sorry for ugly, not-to-scale diagrams):
[PLAIN]http://img198.imageshack.us/img198/7808/questionsc.jpg
(reflects at 148°)
However, on a vertical tangent it would reflect like this:
[PLAIN]http://img808.imageshack.us/img808/2064/question2.png
(reflects at 328°)
This means that:
- On horizontal tangent: reflectionDirection = 180-incidenceDirection
- On vertical tangent: reflectionDirection = 360-incidenceDirection
It's lame to have two different formulas, so is there a general formula for the reflectionDirection that works with both vertical and horizontal tangents? It's fine if it uses radians instead of degrees.
Last edited by a moderator: