Rotate an unit vector passing through origin in three dimensions about x-axis. Where does it make the angle alpha? With x-axis? With y-axis or with z?

Thread Starter

terabaaphoonmein

Joined Jul 19, 2020
121
As you can see my question is very naive that means I do not understand 3d mathematics. So I am seeking for help here.
Books are making rotation about x-axis angle with z-axis that is something I do not understand really. Should not rotation about x-axis in 3d make angle with x itself?
 

MrChips

Joined Oct 2, 2009
34,690
If you are rotating about the x-axis, the x-axis does not move.
Both y-axis and z-axis will move by the same angle.
 

panic mode

Joined Oct 10, 2011
4,913
you need to choose which convention to follow. lookup Euler angles (in your case likely variant known as Tait Brian since true Euler angles deal with two axes only).

it is common in 3D to start with a flat world. then unit normal (pointing up) is a Z vector. it is also common that 3D coordinate follow the right hand rule (but this is also not a must). then first rotation is rotation about that vector though that is not mandatory.

first commercial industrial robot used right hand coordinate system where rotation is following right hand rule and first rotation is about Z axis. this is also axis pointing out of the end of the arm. this is not a coincidence - it is literally a 'textbook example' and it is seen in many cases (DH convention for example). but you may choose different convention. whatever you do, once you make the choice, stick with it...

https://en.wikipedia.org/wiki/Euler_angles
 

MrAl

Joined Jun 17, 2014
13,680
As you can see my question is very naive that means I do not understand 3d mathematics. So I am seeking for help here.
Books are making rotation about x-axis angle with z-axis that is something I do not understand really. Should not rotation about x-axis in 3d make angle with x itself?
Hi,

Look up the 3d rotation equations. Look for the one that is for rotating about the x axis. Rotate the point then see what/where the coordinates are.
 

Thread Starter

terabaaphoonmein

Joined Jul 19, 2020
121
If you are rotating about the x-axis, the x-axis does not move.
Both y-axis and z-axis will move by the same angle.
This is true. But I think I might have a problem that I cannot visualize what rotation means. In 2d, there is no rotation about any axis?? Like rotation about x-axis? If yes what would that mean? I know there is rotation around x-axis matrix for reference.
This is confusing for sure.
 

MrChips

Joined Oct 2, 2009
34,690
If you are coding 3D graphics, one would use matrix arithmetic.
Scaling, translation, and rotation become matrix multiplications.

Here are the rotation matrices about any one of the three axes.

1756227803439.png
 

MrChips

Joined Oct 2, 2009
34,690
If you have a 2D object in the x-y plane, rotation will be about the z-axis.
Does that make sense?
Imagine the 3D space.
The 2D drawing lies on the x-y plane where z = 0.
When you rotate the object, you are rotating about the z-axis.
Both x and y axes move. The z-axis does not move.

Edit: the drawing below shows all three axes remaining stationary. The object (teapot) is rotated. This is relative to the x and y axes.
The object rotates relative to the axis. Or the axis rotates relative to the object (same difference except for the sign).

1756228059646.png
 

MrAl

Joined Jun 17, 2014
13,680
This is true. But I think I might have a problem that I cannot visualize what rotation means. In 2d, there is no rotation about any axis?? Like rotation about x-axis? If yes what would that mean? I know there is rotation around x-axis matrix for reference.
This is confusing for sure.
Did you ever see an analog clock on the wall? That's the kind with the two hands one for hour and one for minute and sometimes another for seconds.

Rotation is when one of the hands moves around first pointing to 1 and then 2 and then 3, etc. You can view the tip of the minute hand as the point being rotated. If we take the center of the clock where the hands pivot as the 'z' axis and the 'z' axis positive end is pointing OUT of the clock face, then the rotation is counterclockwise. That means we look down the 'z' axis from positive toward the origin (0,0,0). For the analog clock, this would mean the rotation would be from 3 to 2 to 1 to 12 to 11 to 10, etc., so the clock would be running backwards.

In that scenario, the 'x' axis would be a line running through the 9 and through the 3 on the clock face.
The 'y' axis would be a line running through the 6 and through the 12 on the clock face.
So draw a line from the 9 to the 3 ('x' axis) and
draw a line from the 6 to the 12 ('y' axis).
The 'z' axis positive points OUT of the clock face right in the very center where all the hands pivot.
That orientation is referred to above.

There are a lot of variations though. For example, sometimes the 'z' axis positive is UP and the 'x' and 'y' axes form a horizontal flat plane that the 'z' axis runs through at (0,0).

There are other ways to rotate but this matrix method is the most standard way to do it, and probably most well-known.
 

Thread Starter

terabaaphoonmein

Joined Jul 19, 2020
121
Thank you for your kind and helpful responses. I personally think visualizing is not something that can be taught/learnt. It must be felt. So, I will instead do my best to memorize so that I can write in exam. I know the math cos sine,I just cannot visualize 3d.
MrAI's comments on analog clock and 2d rotation is very helpful that clicked me somewhat.
I want to thank MrChips for excellent examples.
Based on MrAI's example of analog clock, I think I am getting MrChips example somewhat. As in analog clock when clock hands are rotating, they are both x and y axis is being changed. (that is what I got)
I have already memorized(via mnemonic) the rotation matrices for 3d in homogenous coordinates. However, this did not help (i mean memorizing has never helped anyone) to derive 3d rotation about arbitrary axis.
Although 3d rotation about arbitrary axis is composed of those three rotations formulas and translation, there is some angle calcultion that is going on which requires some geometry/math and visualization first. I wish there was a way to learn it.
 

MrAl

Joined Jun 17, 2014
13,680
Thank you for your kind and helpful responses. I personally think visualizing is not something that can be taught/learnt. It must be felt. So, I will instead do my best to memorize so that I can write in exam. I know the math cos sine,I just cannot visualize 3d.
MrAI's comments on analog clock and 2d rotation is very helpful that clicked me somewhat.
I want to thank MrChips for excellent examples.
Based on MrAI's example of analog clock, I think I am getting MrChips example somewhat. As in analog clock when clock hands are rotating, they are both x and y axis is being changed. (that is what I got)
I have already memorized(via mnemonic) the rotation matrices for 3d in homogenous coordinates. However, this did not help (i mean memorizing has never helped anyone) to derive 3d rotation about arbitrary axis.
Although 3d rotation about arbitrary axis is composed of those three rotations formulas and translation, there is some angle calcultion that is going on which requires some geometry/math and visualization first. I wish there was a way to learn it.
Hello again,

If you still can't visualize it then build a model of a coordinate system x,y,z and think about where a SINGLE point in (x,y,z) moves to when you rotate it in various ways. Do some numerical examples on the computer or calculator, then look at the model and see where the point moves to. Start simple just rotate around one axis.

To build the model, get some thin sticks or straws and glue one end of each stick together with the sticks pointing in the three orthogonal directions x, y, and z. Pick a point inside the model space and represent it with another thinner stick or straw where one end of the straw is at (0,0,0) and the other end is at the point to be rotated (x,y,z). To rotate the point (free end of the thinner stick) about the 'y' axis for example, rotate the thinner stick such that the free end of the stick rotates around the 'y' axis only. If you move it say 45 degrees (45 is easiest to think about) then see where the free end ends up. Do a calculation to compute where it ended up at and compare to the model.

You can also use heavy wire like heavy copper wire as long as it does not bend too easy. You can solder one end of each wire together to form the origin (0,0,0). You can use another heavy wire or stick as the measure for the point where one end you hold at (0,0,0) while you rotate the free end.

Once you do a few of these experiments you get the feel for how 3d works.

If you are looking to visualize the rotation from the matrix entries like sin(angle) or cos(angle) without doing a calculation or experiment with the model, that's not that easy to do. In most cases you don't have to do that anyway.

Here's a quick drawing of what the 3d space model would look like. We start with a cube and then draw the axes (red) along three of the edges. Those axes would be the three sticks or straws or thick wire. The point to be rotated is green at the end of the thinner (blue) stick.
See if this helps.
 

Attachments

MrChips

Joined Oct 2, 2009
34,690
Let's see if this helps.

Every point in 3D space has (x,y,z) values in cartesian coordinates.
Let us focus on rotation about the z-axis. We project the point (or line) on to the x-y plane where z = 0.
The (x,y) values are still the same. z is always zero.

Now we transform (x,y) into polar coordinates, (r,θ).
As we rotate about the z-axis, z is still zero and r remains constant.
Now we transform the rotated coordinates (r, θ+φ) back into cartesian coordinates and we include the original z value.

We can do the same thing for rotation about the other two axes.

1756387363487.png
 

panic mode

Joined Oct 10, 2011
4,913
I personally think visualizing is not something that can be taught/learnt. It must be felt. So, I will instead do my best to memorize so that I can write in exam. I know the math cos sine,I just cannot visualize 3d.
it takes practice....

i strongly suggest getting physical representation of the unit vectors. you can make them out of solid wire or pencils or whatever. and have each point couple of inches long. then mark each axis. now you have something you can hold it and see what is happening.

construction can be crude or more permanent. i would say 3D print it or check your local hardware store for some tube and T joints like this so you can make couple of them. Just stick pieces of tube into the T and mark the axes (X,Y,Z):
1756390799096.png

there are software tools that can help great deal with it but learning how to use them is time consuming.
 

MrChips

Joined Oct 2, 2009
34,690
Or get a cardboard box and cut away two sides to leave two sides and the bottom meeting at just one corner which will be the origin, x=0, y=0, z=0.

1756397570162.png
 
Top