General equation for projection of regular grid onto a line

geometryprojectionrotations

I have a regular grid of points in $xy$, say a square grid, and I want to make an orthonogal projection onto a line through the origin, with slope $\tan \alpha$:

enter image description here

I would like to derive a mathematical expression for the positions of the projected points on the line.

Can I write down a general expression for the orthogonal projection matrix of a bunch of points onto a straight line of known slope and intercept?

Best Answer

Yes.
First you should determine the unit vector describing the line of projection. In your case it is $v=[\cos \alpha \ \ \sin \alpha]^T$.
And now every point $P$ described by the vector $p$ can be projected to the line with the projection matrix $vv^T$ to the vector $p_p=vv^Tp$.
If you have bunch of points use simply matrix constructed from column vectors describing these points

$[p_{p1} \ \ p_{p2} \ \ \dots \ \ p_{pn}]=vv^T[p_1 \ \ p_2 \ \ \dots \ \ p_n]$.

Related Question