I am trying to rotate an image along the z-axis, to get a
perspective change
like the Dock appears in Leopard. If I have a rectangular image, is
there
an easy way to rotate it to achieve this? I thought that I might
find some
luck with CATransform3D, but the documentation I've encountered
didn't do
much to help, and I couldn't find any clear examples of how to do
this. If
it can be done without Core Animation, that would work as well. Any
insight
and help would be greatly appreciated!
Do a search on "perspective transformation matrix". That will give
you the mathematics behind what to put in the 4x4 matrix
(CATransform3D struct).
It's been years since I've worked in Linear Algebra, but it may be
possible to split that 4x4 as a product of 3x3 matricies??? If that's
even doable, you theoretically could then apply those "2D" transforms
to the current graphics context to achieve the same effect via say
NSAffineTransform, CG APIs, etc.
Note that unless replies will be talking specifically about what Cocoa
APIs to use, they should probably be kept off-list. This reply isn't
meant to start a thread on the mathematics itself behind this type of
transform.