Vector Projection with respect to another vector

222 Views Asked by At

I have learnt about orthogonal projections, but now there is a new problem regarding non orthogonal projections. As seen in the image, given vector d, i would like to project vector v to the line with a normal (n), with respect to d. How do I find the transformation matrix to do this? only d and n is given.

1

There are 1 best solutions below

0
On

I think what you're trying to do is this:

Given vectors $v$, $n$, and $d$, you want a vector $v'$ such that $v'\perp n$ and $v-v'$ is parallel to $d$. So write $v-v'=kd$ for some unknown scalar $k$, and take the dot product with $n$; you get $$k(n\cdot d)=n\cdot(v-v')=n\cdot v-n\cdot v'=n\cdot v$$ so $$k={n\cdot v\over n\cdot d}$$ and then $$v'=v-kd=v-{n\cdot v\over n\cdot d}\,d$$