To do frame arithmetic, frames do not really help! We need the transformation matrice.
What do do?
- let's call the reference coordinate system from previous post C0
- the Target Frame (or target coordinate sytem from previous post) coordinate system C1
Checking the contents of Notepad we can (will) see:
- translation (shift along the reference coordinate system - yellow part)
- axes of the target coordinate system are divided into pieces of the reference coordinate system (blue part)
By now we have a matrice with four columns and only three rows!
For matrice multiplication we need a matrice 4x4
The red marked row fullfill this requirement without changing the result of the matrice
For this thread we are only have a look for the values in the blue field and there are some more restrictions:
- coordinate system must follow the right hand rule (x:thumb, y: index finger; z: middle finger). There is also an easier way: draw x-axis horizonal, y-axis vertical (as learned at school) put a box with lower left corner to the origin of your xy-coordinate system and the upper left corner will show the z-direction (in my area z-axis would go up). You can check that by calculating the determint of the rotation matrice with a result of +1
- the sum of x*x+y*y+z*z must be one; in word 1.0 - reason:radius of the sphere equals 1.0
next part will be a closer look to the rotation matrice