Can I get a basic explanation of CATransform3DIdentity?

I am slowly becoming more serious in Core Animation and really appreciate the explanation consisting of short words spoken (typed?) Slowly explaining CATransform3DIdentity and why the following code does what it does (flips the layer around in “3D” space)

kFaceUpTransform = kFaceDownTransform = CATransform3DIdentity; // Construct a 180-degree rotation matrix: kFaceDownTransform.m11 = kFaceDownTransform.m33 = -1; 

Secondly, enter quickly and use polysyllabic words for your heart, but please be careful.

PS. I got the impression that I should be much more comfortable with linear algebra if I go much further with animation ... is that right?

+7
source share
1 answer

CATransform3DIdentity is an Identity matrix:

http://en.wikipedia.org/wiki/Identity_matrix

Basically, matrices in animation math are used to transform an object (skew, move, rotate, etc.).

An identity matrix is ​​one that is applied to an object and resets it to the initial geography.

ex.
[one hundred]
[0 1 0]
[0 0 1]

It’s not easy to explain (I really don’t understand myself correctly), but these 3x3 matrices use the grid location (m11, m33) to determine how to transform the object, in this case m11 makes it rotate 180 degrees, set it to +1, and it will turn the other direction. Set it to 0.5 and rotate it 90 degrees (iirc!).

ex.
[m11, m12, m13]
[m21, m22, m23]
[m31, m32, m33]

It's a little scary, but the pictures here are kind of help:

http://en.wikipedia.org/wiki/Matrix_(mathematics)#Linear_transformations

and here

http://en.wikipedia.org/wiki/Transformation_matrix

Finally, the table at the bottom of this list shows how the different fields of the matrix are used:

Provided through the Internet Reverse Path Machine: http://developer.apple.com/library/mac/#documentation/ Cocoa / Conceptual / CoreAnimation_guide / Articles / Layers. HTML

Finally, I remember how it was read some time ago, it can be useful, because I think that my explanations above are not so convenient - I tell you what and not why - and believe me, you need to know why for proper programming of this kind:

http://chortle.ccsu.edu/vectorlessons/vectorIndex.html

Good luck

+14
source

All Articles