Decompose rotations of a vector

In summary, the conversation discusses a C++ class that generates a circular signal using sine and cosine in perpendicular directions. The user inputs the norm to the surface and the program generates the signal. The question is how to find two perpendicular vectors given a user-provided vector. The solution involves defining a plane using the provided vector, solving for an orthogonal vector, and taking the cross product to get two perpendicular vectors.
  • #1
TheDestroyer
402
1
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?
 
Last edited:
Mathematics news on Phys.org
  • #2
TheDestroyer said:
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.
 
  • #3
Thanks a lot, man :-)
 

FAQ: Decompose rotations of a vector

What is meant by "decompose rotations of a vector"?

"Decomposing rotations of a vector" refers to breaking down a rotation into multiple smaller rotations that can be easily understood and analyzed. This allows for a more in-depth understanding of the overall rotation and its effects on the vector.

Why is it important to decompose rotations of a vector?

Decomposing rotations of a vector is important because it allows us to understand and analyze complex rotations in a more manageable way. By breaking down a rotation into smaller components, we can better understand how the vector is affected by each individual rotation and how they combine to create the overall rotation.

What are the steps involved in decomposing rotations of a vector?

The steps involved in decomposing rotations of a vector may vary depending on the specific rotation and vector being analyzed. However, the general process involves identifying the axis of rotation, determining the angle of rotation, and breaking down the rotation into smaller rotations along the x, y, and z axes.

How can decomposing rotations of a vector be applied in real-world scenarios?

Decomposing rotations of a vector can be applied in various fields such as physics, engineering, and computer graphics. In physics, it can be used to understand the movement of objects in three-dimensional space. In engineering, it can be used to analyze the movement of machines and structures. In computer graphics, it can be used to create realistic animations and simulations.

Are there any limitations to decomposing rotations of a vector?

One limitation of decomposing rotations of a vector is that it may not always accurately represent the overall rotation. This is because not all rotations can be broken down into simpler components without losing some information. Additionally, decomposing rotations can become more complex and time-consuming for rotations with multiple axes of rotation.

Back
Top