Finding an orthogonal vector

  • #1
Hey guys,

Given a vector, ie < -1, 2, 3 > , how does one go about finding a vector which is orthogonal to it?

I also have another vector < x, y ,z > which is the point of origin for the above vector.

In context, I'm given a directional vector from which I need to find an 'up' vector and a 'horizontal' vector. You can see here http://www.cs.auckland.ac.nz/~jli023/images/opengl/pov-ray/viewplaneAnglechanged.jpg - I have a 'look_at' vector and must determine a suitable up and right vector.

I know that to get the right/ horiztonal vector I can just take the cross product between the directional / look at vector and the up vector. However, how to get the up vector confuses me.

A standard up vector is <0 1 0 >. Would it make sense to take the cross product of <0 1 0 > and the direction vector - to get the horizontal vector. And then take the cross product of the horizontal and directional vectors to get the proper up vector? It makes sense to me, however I have no real way of checking if my answer is correct! - I need to find some nice 3d plotting software hehe

Cheers,
Dan
 

Answers and Replies

  • #2
tiny-tim
Science Advisor
Homework Helper
25,832
251
Welcome to PF!

Hi Dan! Welcome to PF! :smile:

I'm confused :confused: … surely all up vectors are the same?

(and not orthogonal to the 'look at' vector)
 

Related Threads on Finding an orthogonal vector

  • Last Post
Replies
12
Views
1K
  • Last Post
Replies
1
Views
2K
Replies
2
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
2K
Replies
6
Views
219
  • Last Post
Replies
9
Views
1K
Replies
4
Views
2K
Replies
1
Views
2K
Top