Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculate 3D vector perpendicular to a plane generated by two vectors

Tags:

math

geometry

3d

I am new to dealing with 3D, and even simple stuff makes my head spin around. Sorry for the newbie question.

Lets say I have 2 vectors:

a(2,5,1)
b(1,-1,3)

These vectors "generate" a plane. How can I get a third vector perpendicular to both a and b?

I can do this in 2D using a vector c(A,B) and turning it into c'(-B,A).

Thanks for the help.

like image 767
nonammeN Avatar asked Nov 28 '22 20:11

nonammeN


1 Answers

Use the cross product.

That is, a vector perpendicular to a and b is given by ( a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x).

like image 84
moonshadow Avatar answered Dec 04 '22 08:12

moonshadow