Rotation Matrix in 3D: Correcting Errors in 3D Coordinate System Rotation

In summary, the conversation revolves around rotating a coordinate system along the y-axis in the clockwise direction. The formula used for this rotation involves a rotation matrix, and there is a discussion about the appropriate way to calculate using this matrix. The original question asks about a specific point's coordinates after rotation, and there is some confusion about the correct answer. Ultimately, the correct coordinates are determined to be (√2, 0, 0) after the rotation. The individual expressing the issue is grateful for the input and clarification from others involved in the conversation.
  • #1
Niles
1,866
0

Homework Statement


Hi

I have a coordinate system as attached, and I want to rotate it along the y-axis in the clockwise direction as shown. For this purpose I use
[tex]
R = \left( {\begin{array}{*{20}c}
{\cos \theta } & 0 & {\sin \theta } \\
0 & 1 & 0 \\
{ - \sin \theta } & 0 & {\cos \theta } \\

\end{array} } \right)
[/tex]
where θ<0 since I rotate CW. Say I now look at the point (x, y, z) = (1, 0, 1). This I want to rotate by θ=-45 degrees, which then becomes in the new system (x', y', z') = (0, 0, 1/√2). But that is wrong, according to my figure (which satisfies the right-hand rule) it should give (x', y', z') = (1/√2, 0, 0).

I thought I had followed the convention with the right-hand rule, but I must have made an error somewhere. I can't figure out where it is though, it seems consistent. I would be happy to get some feedback.Niles.
 

Attachments

  • coordinate_system.JPG
    coordinate_system.JPG
    2.3 KB · Views: 362
Last edited:
Physics news on Phys.org
  • #2
Hello Niles

I don't know how you got (0, 0, 1/√2).

I multiplied your rotation matrix with (1,0,1) & got the right answer, which is (√2, 0, 0)

cos(-45) = 0.707
sin(-45) = -0.707
 
  • #3
prash_neo said:
Hello Niles

I don't know how you got (0, 0, 1/√2).

I multiplied your rotation matrix with (1,0,1) & got the right answer, which is (√2, 0, 0)

cos(-45) = 0.707
sin(-45) = -0.707

Hi, and thanks

I think you must have made an error, it does give (0, 0, 1/√2). I just tried it out in Mathematica.
 
  • #4
Hello Niles,

I think it should give (0,0,√2)

The point (1,0,1) lies on XZ plane. So its distance from origin is √ (1 + 1) = √2
As per the image you have attached.
It makings an angle of 45° CCW with Z-axis.
Now you are rotating the point CW 45°.
i.e you are moving the point about Y-axis, towards Z-axis.
So with distance from origin (or Y-axis) remaining constant, the point should now lie on Z-axis.
So the final point is (0,0,√2)
 
  • #5
Niles said:

Homework Statement


Hi

I have a coordinate system as attached, and I want to rotate it along the y-axis in the clockwise direction as shown. For this purpose I use
[tex]
R = \left( {\begin{array}{*{20}c}
{\cos \theta } & 0 & {\sin \theta } \\
0 & 1 & 0 \\
{ - \sin \theta } & 0 & {\cos \theta } \\

\end{array} } \right)
[/tex]
IF you are doing the calculation as "Av" so that v is a column vector, then it should be
[tex]R= \begin{pmatrix}cos(\theta) & 0 & -sin(\theta) \\ 0 & 1 & 0 \\ sin(\theta) & 0 & cos(\theta)\end{pmatrix}[/tex]

If you do the calculation as vA, with v a row vector, then what you give would be correct.

where θ<0 since I rotate CW. Say I now look at the point (x, y, z) = (1, 0, 1). This I want to rotate by θ=-45 degrees, which then becomes in the new system (x', y', z') = (0, 0, 1/√2). But that is wrong, according to my figure (which satisfies the right-hand rule) it should give (x', y', z') = (1/√2, 0, 0).

I thought I had followed the convention with the right-hand rule, but I must have made an error somewhere. I can't figure out where it is though, it seems consistent. I would be happy to get some feedback.Niles.
 
  • #6
prash_neo said:
Hello Niles,

I think it should give (0,0,√2)

The point (1,0,1) lies on XZ plane. So its distance from origin is √ (1 + 1) = √2
As per the image you have attached.
It makings an angle of 45° CCW with Z-axis.
Now you are rotating the point CW 45°.
i.e you are moving the point about Y-axis, towards Z-axis.
So with distance from origin (or Y-axis) remaining constant, the point should now lie on Z-axis.
So the final point is (0,0,√2)

I'm rotating the coordinate system, not the point as such. So it should give (√2,0,0) -- and it does when I follow HallsOfIvy's approach.

Thanks to both of you.
 

1. What is a rotation matrix in 3D and how is it represented?

A rotation matrix in 3D is a mathematical tool used to represent the rotation of a three-dimensional object around a fixed point. It is represented by a 3x3 matrix with nine elements that describe the rotation in terms of the three axes (x, y, and z).

2. How do you calculate the rotation matrix for a given angle and axis?

To calculate the rotation matrix for a given angle and axis, you can use the Rodrigues' formula, which involves using the axis-angle representation of rotation and converting it into a matrix form. Alternatively, you can also use the Euler-Rodrigues formula or the quaternion method.

3. What is the difference between a rotation matrix and a transformation matrix?

A rotation matrix only describes the rotation of an object, while a transformation matrix can include other transformations such as translation, scaling, and shearing. In other words, a rotation matrix only affects the orientation of an object, while a transformation matrix can change its position, size, and shape.

4. Can a rotation matrix be used to rotate a 3D object in any direction?

Yes, a rotation matrix can be used to rotate a 3D object in any direction. This is because a rotation matrix can represent rotations around any axis in 3D space, allowing for rotations in all directions.

5. How is a rotation matrix used in computer graphics and animation?

A rotation matrix is used in computer graphics and animation to manipulate the orientation of 3D objects. It is often used in 3D modeling software to rotate objects and create realistic animations. Without rotation matrices, it would be challenging to create smooth and accurate 3D animations.

Similar threads

  • Calculus and Beyond Homework Help
Replies
10
Views
1K
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
958
  • Calculus and Beyond Homework Help
Replies
5
Views
682
  • Calculus and Beyond Homework Help
Replies
3
Views
558
  • Calculus and Beyond Homework Help
Replies
3
Views
797
Replies
2
Views
983
  • Calculus and Beyond Homework Help
Replies
3
Views
328
  • Calculus and Beyond Homework Help
Replies
10
Views
868
  • Mechanical Engineering
Replies
3
Views
455
Back
Top