Tip:
Highlight text to annotate it
X
Introduction to ICE Kinematics. Part 02 - About transforms
Hello. In the second tutorial we will talk about transform matrix of an object and about it meaning
Ok, let's create null
And add to it trivial ICE tree for display of a transform matrix
Take a global transform
Set it
And display transform matrix numerically
The object placed in the origin of a scene, that's why the matrix is identity
By moving object along axis Ox, Oy and Oz we see that tree components in the last row is object's position in 3d space
When we rotate the object around axis Oz by 90 degree
transform matrix will change, and we see that
local axis Ox looks along global axis Oy and that's why has coordinates (0, 1, 0). This written in the first row
Local axis Oy looks opposite of the global axis Ox, and his coordinates are (-1, 0, 0), which written in the second row
So, in first three rows are written coordinates of local basis vector in the global coordinate system
Additionally, if we rotate our null to 45 degrees we will see that these are numbers 0.7071. This is sinus and cosines of 45 degrees
If you remember the linear algebra you can notice that this matrix is very similar to transition matrix from one basis to an other
Indeed, in the transition matrix we write coordinates of basis vectors in other basis
Here we have coordinates of local base vectors in global coordinate system
So, this matrix is transition matrix from global coordinate system to local coordinate system
As usual transition matrix, it can be used for calculating coordinates of a vector by coordinates of the same vector in an other coordinate system
Well, let's try to do this
Add a vector with coordinates (1, 0, 0)
And let's try to multiply it to the transform matrix
Don't be afraid that matrix has dimension 4, but vector is dimension 3
In this case the fourth component with value 1 is added, and after multiplication this fourth component remove
Multiply and observe the result
I shift matrix little bit
Let's display a vector
It directed along the axis Ox
And display the result numerically
As matrix is identical, we obtain the same vector
If we rotate our object in 90 degrees, we will see that this vector (1, 0, 0) is still directed along local axis Ox
But in the result of multiplicity we obtain vector (0, 1, 0), and this is exactly coordinates of this vector in global coordinate system
If we translate our null in to two units
We obtain that local coordinates are the same, but global coordinates are (2, 1, 0)
So, by multiplying transform matrix to a vector we obtain global coordinates of this vector
this is the most important property of a transform matrix
It allow to find global coordinates of a vector by local ones
Well, let's finish our second tutorial