#### Archived

This topic is now archived and is closed to further replies.

# Finding Orthogonal Vectors

This topic is 6967 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

A vector has an infinite number of orthogonal vectors. Do you want any one of these vectors or are there further requirements not mentioned in the original post?

##### Share on other sites
How do you generate an orthogonal vector in 3D given you only know one vector (i.e. I know the direction the object is moving, but I want to generate a vector that's perpendicular to that vector). If convoluted math is involved, give it to me straight, I can take it.

##### Share on other sites
For example

v1 (DOT) v2 = 0 gives orthogonal vectors

so you get

v1 = (a, b, c)
v2 = (x, y, z)

so ax + by + cz = 0.

This can be trivially solved by setting
any of

x=y=1 and so z = -(a+b)/c (if c != 0)
x=z=1 so y = -(a+c)/b (if b!=0)
y=z=1 so x = -(b+c)/a (if a!=0)

Once you've done this once,
the third vector can be generated by taking the cross of the two vectors, defined by

(bz-cy, cx-az, ay-bx) = (a1, b1, c1)

Anyway,
HTH.

signing off,
mikey

1. 1
2. 2
Rutin
17
3. 3
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633735
• Total Posts
3013597
×