views:

423

answers:

2

There is a function like:

CATransform3DGetAffineTransform

Returns the affine transform represented by 't'. If 't' can not be exactly represented as an affine transform the returned value is undefined.

I'm not so math-orientated, so a easy to understand description would be very nice. Wikipedia was no big help here.

+1  A: 

CoreAnimation uses 3D transforms. Affine transforms are a 2D subset of those 3D transforms. They allow only translation, rotation and scaling in X,Y plan.

mouviciel
That is not true - affine transformations are transformations that preserve collinearity and ratio of distances. Translation, rotation, scaling, and more are affine in three dimensions, too.
Daniel Brückner
I should have precised that the scope of my answer was Cocoa and NSAffineTransform.
mouviciel
+5  A: 

Affine transformations are transformations that do not "overly distort" your geometry in the sense that:

  • points that lay on a line before still lie on a line after the transformation
  • the relative distances between points stay the same (so a square might not be square anymore, but still has equal side lengths)

So rotation and scaling are affine - projection, for example, is not.

Tobiesque