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

Orthogonal projection - embarrassed

  1. Aug 23, 2013 #1
    Hi there

    I am trying to project some 3D points on to the span of two orthogonal vectors.

    v1 = [ -0.1235 -0.9831 0.1352]
    v2 = [ 0.7332 -0.1822 -0.6552]

    I used the orthogonal projection formula

    newpoint = oldpoint-dot(oldpoint,normal(v1,v2))*normal(v1,v2);

    but when I plot it in matlab I dont get the points projected onto the plane.

    Any ideas were I am going wrong?

    Cheers

    Duane
     
  2. jcsd
  3. Aug 23, 2013 #2

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Looks right to me. Have you inspected the intermediate results to see where it diverges from what you expect? (You could start with a simpler pair of vectors.) If still stuck, pls post the intermediate results.
     
  4. Aug 24, 2013 #3
    Hi there,

    Thank you for the reply. I went mental yesterday because I knew the math was right and subsequent calculations, such as the within plane angle, were all correct.

    The problem I found was with matlabs quiver3 function. It wasn't plotting the vectors correctly and so in the end I made my own and plotted them using + points. Can't put that in a paper lol but at least it demonstrates what I was trying to do.

    Thanks again for thinking about this

    Duane
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Orthogonal projection - embarrassed
  1. Orthogonal basis (Replies: 5)

  2. Orthogonal Matrices (Replies: 1)

Loading...