Rotating four nodes around z-axis then x-axis with rotation equations

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
1 reply · 2K views
laminatedevildoll
Messages
211
Reaction score
0
I had to rotate four nodes x,y,z around the z-axis, then the x-axis using rotation equations and an angle. The whole point of the program is to change the input data into a new coordinate system. I think that my data looks right, but I need a second opinion.

Input

x | y | z

1.| 0.00 | 0.00 | -2.00
2.| -10.00 | 0.00 | -2.00
3.| 0.00 | 5.00 | -2.00
4.| -10.00 | 5.00 | -2.00

Output

-10.0000 -0.742781 -1.85695
0.00000 -0.742781 -1.85695
-10.000 4.64238 -1.85695
0.00000 4.64238 -1.85695
 
Last edited:
Physics news on Phys.org
I am not an expert on this, but as I try to visualize:

On the room floor, the X axis runs W-E, Y axis runs S-N. Z axis runs floor-ceiling.

Your 1st node is located on the Z axis 2 inches below the origin. You first rotate it around the Z axis, and it stays where it is. You then rotate it around the X axis, shouldn't its new coordinates be (0,0,+2)?