HACKER Q&A
📣 shivajikobardan

How does choice of coordinate system affect 3D transformation?


I am going through rotation about an arbitrary axis in three dimensions, rotation about x, y and z-axes in three dimensions etc.

And there are coordinate system that are called as:

- left handed coordinate system

- right handed coordinate system

For some reasons I have observed ambiguousness in various rotation matrices.

Example: Rotation about y-axis by t could be written as:

    $$
    \begin{bmatrix}
    cost & 0 & -sint & 0 \\
    0 & 1 & 0 & 0 \\
    sint & 0 & cost & 0 \\
    0 & 0 & 0 & 1
    \end{bmatrix}
    $$
    
I have seen someone interchanging the sin of sint in some textbooks/authors/videos(like this: https://www.youtube.com/watch?v=ZEXpxIwpGbY)

Check 25:28 of the video and step numbered (3).

This is frying my brain since few days. I know getting free assistance in this huge topic is not possible. But even if you could display a small support, small guidance, that would be greatly push me through this phase.

References:

https://stackoverflow.com/questions/19747082/how-does-coordinate-system-handedness-relate-to-rotation-direction-and-vertices


  👤 shivajikobardan Accepted Answer ✓
My question about sign swapping is explained by this blog

https://www.cairographics.org/cookbook/matrix_conventions/

The reason behind this is called pre-multiplication vs post-multiplication technique of matrix transformation.

Post-multiplication

- transformation matrix appears after the position vector matrix

- position vector matrix in homogenous coordinates is represented as a row matrix.

Pre-multiplication

- transformation matrix appears before the position vector matrix

- here the position vectors in homogenous coordinates are represented in column matrix.

Textbook reference: Mathematical elements for computer graphics Rogers/Adams


👤 shivajikobardan
About finding angles, found some good information(I have not yet understood).

https://www.math.umd.edu/~wmg/Marsh.pdf


👤 sxzygz
You should know the sine and cosine for, say, 30 degrees. Say you’re rotating about the y-axis then you’ll rotate the xz-plane. Take the point (1,0,0). This is in the xz-plane (when y=0). Rotate it by 30 degrees about the y-axis. Where should it go? Draw the picture! Do the calculation with the matrix formula you are given, do they agree? Do this for different axes, different angle values, and different points. Eventually you will understand.

Hint: the standard way of drawing a normal graph has the x-axis positive to the right and the y-axis positive up. The right-handed coordinate system has the z-axis pointing out of the paper. This is where your fingers curl from x to y. In this coordinate system, looking down from the positive y-axis into the xz-plane, which direction does going from x to z curl around the y-axis? Is it right-handed or is it left-handed?

Good luck, keep at it!