Sign in to follow this  
Followers 0
Doublefris

Project points to subspace

8 posts in this topic

Let's say I have some coplanar points in R^3. I want to describe these points by coordinates on the plane they share, in R^2. This way I can do some tests faster. How should I do this? 

0

Share this post


Link to post
Share on other sites

Let's say I have some coplanar points in R^3. I want to describe these points by coordinates on the plane they share, in R^2. This way I can do some tests faster. How should I do this? 

 

Take any 3 distinct points A, B, and C. Take the cross product of (B - A) and (C - A) to get the normal, N, of the plane. Let (B - A) be one of your axes (normalize it). Take the cross product of N and (B - A) to get another orthogonal vector in the plane as the other axes (normalize it). Then project your points (relative to A) in your new axes.

 

-Josh

Edited by jjd
4

Share this post


Link to post
Share on other sites

Thanks! Am I right when I think that the final projection could be a matrix multiplication by the 2x3 vectors we obtained? 

0

Share this post


Link to post
Share on other sites

Thanks! Am I right when I think that the final projection could be a matrix multiplication by the 2x3 vectors we obtained? 

 

Yes, once you have subtracted A from all of the points.

 

-Josh

1

Share this post


Link to post
Share on other sites

If you have an orthonormal basis of your subspace, you can find the coefficients of the projection by simply computing the inner product of the vector to be projected and the basis vectors. So yes, the computation boils down to a matrix multiplication that turns three numbers into two.

 

In order to get an orthonormal basis for the sub-space, you can use the [url="http://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process"]Gram-Schmidt process[/url].

 

[EDIT: I am not saying anything new, just rephrasing what others have said, in the hopes that my description might be easier to understand to some.]

Edited by Álvaro
2

Share this post


Link to post
Share on other sites

I'm wondering if there's a way to avoid having to subtract the subspace's origin before doing projection, by encoding the origin in the matrix. Is it possible using homogenous coordinates?

0

Share this post


Link to post
Share on other sites

I'm wondering if there's a way to avoid having to subtract the subspace's origin before doing projection, by encoding the origin in the matrix. Is it possible using homogenous coordinates?

 

Yes, you can encode a translation into the matrix by adding a row and a column and by appending a "1" to the coordinates of the point. This is related to homogeneous coordinates, but I am not going to try to describe the details here.

0

Share this post


Link to post
Share on other sites

I haven't tried but wouldn't I have to subtract the origin BEFORE doing the projection? or does the order not matter?

0

Share this post


Link to post
Share on other sites
You can either subtract the origin of the subspace before the projection or subtract the projection of the origin of the subspace after the projection.

Projection(P - O) = Projection(P) - Projection(O) (because the projection is linear)
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0