Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Projecting 3D point to 2D / view-point

  1. Jan 9, 2012 #1
    Recently I was assigned to implement a procedure involving "3D projections" to "2D space". Supposing that 3D data is stored in a n x 3 matrix X, the final step involves Y=XP, where P is a 3x2 matrix. However, I would need to be sure about the actual meaning of the word "projection" to 2D. In my understanding (I deliberately tend to be descriptive), there are some points in 3D, I'm looking at it from above, and there is a piece of paper below the data (paper is fixed).

    So, each time I multiply XP to obtain Y in 2D, it actually means I'm changing the viewpoint, and Y actually corresponds to what I see when looking at the data (as on the fixed paper), right? In other words, with every P, I'm changing the viewpoint and taking the picture (or drawing on a paper, thus 2D) of what I see? If so, that would mean that for any P there is a viewpoint. Please correct me if I'm wrong.
  2. jcsd
  3. Jan 10, 2012 #2
    There are two ways of viewing the projection.

    First, you view the projection on the 2D plane with respect to the standard basis of 3D space. That is the same coordinate system used by the row vectors in that n-by-3 matrix, X.

    Second, you view the projection with respect to the basis of that 2D plane.

    In any case, you need to know how is your 2D plane orientated.

    You get the second type projection if you use your method Y = XP such that each of the two columns of P has length = one and they are perpendicular to one another. (Sorry for those who read orthogonal matrix before edit, I was very tempted to use the term here)

    To get the first type projection, I can think of a view ways to do it but I will give you the most straight forward solution (in terms of theory) that I know - orthogonal projection. If you use software like MATLAB, pseudoinverse is even simpler to use to get the solution but the theory behind it is not as easy.

    Since you store your 3D coordinates as row vectors of matrix X then this is the way to do it. I give you straight solution. If you want the theory check out orthogonal projection.

    [itex]Y = A(A^TA)^{-1}A^TX^T[/itex]

    A is a 3-by-2 matrix such that it has full column rank i.e. the two column vectors are independent of one another. Now, A is not restricted to "almost orthogonal" matrix P of your method.

    Now your projections are stored as column vectors in a 3-by-n matrix Y, not row vectors like the original coordinates stored in X. Furthermore, the projections are coordinates with respect to the standard basis of the 3D space.
    Last edited: Jan 10, 2012
  4. Jan 11, 2012 #3


    User Avatar
    Science Advisor

    Hey Onako.

    Projections have the property that P^2 = P. This means that if you apply a projection more than once to a piece of data that is already projected, the result will not change. This is a fundamental property of all projections.
  5. Jan 11, 2012 #4
    Thanks for the answers.
    I believe that my initial interpretation was correct, but I need to add "projection surface". With it, the matrix
    multiplication from above could mean change of the viewpoint, but also the projection surface.
  6. Jan 11, 2012 #5


    User Avatar
    Science Advisor

    If its a standard orthogonal project, your surface is just a simple oriented plane in the appropriate number of dimensions which can be represented using standard means [like n . (r - r0) = 0]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook