Friday, November 7, 2008

Projecting vectors


Sometimes we need to project one vector over another. See the picture below , we can see a vector u. Now we need to project this u on to x axis, .






This can be done with this equation : p = x * u . (x / Norm[x] ) . p is the result

"." means Dot product. What that equation means is we need to normalize x first ( in general to which we are projecting u vector ) and find the dot product between u and normalized x , and mulitply our x(destingation ) vector by this scalar value. Now we will get the result.

No comments: