Register to reply 
Decompose rotations of a vector 
Share this thread: 
#1
Apr812, 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 xaxis, and the sine on the yaxis. Is it possible to decompose it that way? 


#2
Apr812, 07:20 AM

P: 4,572

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. 


#3
Apr812, 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 