Orthogonal projection - embarrassed

  • #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
 

Answers and Replies

  • #2
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
34,276
5,843
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.
 
  • #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
 

Related Threads on Orthogonal projection - embarrassed

Replies
1
Views
2K
Replies
1
Views
1K
Replies
10
Views
1K
Replies
3
Views
4K
Replies
5
Views
707
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
5
Views
3K
  • Last Post
Replies
16
Views
888
Replies
4
Views
27K
Top