[SOLVED] Math Question: How to project a vector onto a normal

@Didier It might just be my lack of properly understanding Quaternions, but I still think that the vector based approach is more appropriate in this case.
As far as I understand it, Quaternions are an elegant way of describing rotations in 3D space, because of the three complex numbers they use, while I assume he wants to project the vector onto the plane, instead of rotating it into the plane. Like a shadow (assuming that the incoming light is parallel to the surface normal).

As far as I understood the problem, this is what he wants:


where <·, ·> resembles the dot product and the surface normal n has a length of 1. Also there is no rotation or any other (euler) angles involved. If one wants the resulting vector to be as long as the original one, one could apply some simple stretching to it.

3 Likes