Register to reply

Decompose rotations of a vector

by TheDestroyer
Tags: decompose, rotations, vector
Share this thread:
TheDestroyer
#1
Apr8-12, 06:32 AM
P: 397
Hello guys,

I'm programming a class in C++ that generates a circular signal. The signal consists of a sin and cos in perpendicular directions.

The user has to input the norm to the surface, and the program generates the sine and cosine in 2 perpendicular directions to that norm to generate the circular signal.

The question is the following. If the user provided this vector, how can I find those 2 perpendicular vectors?

I think this problem can be reduced to finding the Euler angles that rotated this vector from being parallel to the z plane. So that the cosine remains on the x-axis, and the sine on the y-axis. Is it possible to decompose it that way?
Phys.Org News Partner Mathematics news on Phys.org
'Moral victories' might spare you from losing again
Fair cake cutting gets its own algorithm
Effort to model Facebook yields key to famous math problem (and a prize)
chiro
#2
Apr8-12, 07:20 AM
P: 4,572
Quote Quote by TheDestroyer View Post
Hello guys,

I'm programming a class in C++ that generates a circular signal. The signal consists of a sin and cos in perpendicular directions.

The user has to input the norm to the surface, and the program generates the sine and cosine in 2 perpendicular directions to that norm to generate the circular signal.

The question is the following. If the user provided this vector, how can I find those 2 perpendicular vectors?

I think this problem can be reduced to finding the Euler angles that rotated this vector from being parallel to the z plane. So that the cosine remains on the x-axis, and the sine on the yyaxis. Is it possible to decompose it that way?
Hey TheDestroyer.

If you have the vector that is normal to the surface, then you can define the plane using n . (r - r0) = 0 where n is the normal and r0 is a point on the plane. Now to get the orthornomal basis (the two perpendicular vectors with respect to the supplied one) you have to solve the equation n . a = 0 for some a. Just choose the x and y components of a randomly and then solve for the z component of a. Normalize a to a unit vector.

After this you take the cross product of n and a to get a vector b and then take the cross product of n and b to get c. Normalize c and b and your perpendicular orthogonal unit vectors to n are the normalized c and b vectors and that completes your orthonormalization.
TheDestroyer
#3
Apr8-12, 07:58 AM
P: 397
Thanks a lot, man :-)


Register to reply

Related Discussions
When can I decompose a random variable $Y=X'-X''$? Set Theory, Logic, Probability, Statistics 4
Boost generator transforms as vector under rotations Quantum Physics 4
Decompose to water and oxygen Biology, Chemistry & Other Homework 1
Decompose Precalculus Mathematics Homework 2