Please stop implementing page curls, especially for reflowable unpaginated text, especially if you're not using flash and have rich text layout support (as you do in Cocoa).
The rich text situation is somewhat different on the iPhone than it is on OSX/Cocoa. There is no NSTextView, for instance. The only "easy" rich text solution on iPhoneOS is a UIWebView - which isn't exactly cheap in terms of CPU utilization. Ironically, a visual effect such as a page curl is likely far cheaper due to the GPU support than reflowing a bunch of rich text.
My comment was referring to NSTextView which is present in OSX/Cocoa. NSTextView is extremely powerful and feature-rich. UITextView is.... not so much, of course. :)
I wonder how long the page curl meme will stay around. Movies are still being identified by the analog movie strip image, but will it still be the case in 10 years?
I think they will, simply because they need to look like something. It wouldn't really help you navigate your OS if everything was represented by glowing rectangles†, would it?
I haven't looked at the code yet, but I've been curious how they do this. I am not a mathematician, but my understanding is that the affine transform only lets you scale, rotate, and skew the whole image at a time.
Is the page curl effect some kind of custom non-affine transform? Or am I missing a simple way to do this using a single linear transformation?
You are right[1], and there won't be a single linear transform. This page curl will almost certainly be a piecewise linear approximation using a triangle mesh whose vertices are animated according to the user input.
1. The GPU will also support projective transforms - but that won't help here.
> This page curl will almost certainly be a piecewise linear approximation using a triangle mesh whose vertices are animated according to the user input.
I honestly can't tell if your being facetious here or not. There are certainly much simpler ways of pulling off this effect; ask any Demoscene participant.
Simpler in what way? Demoscene code is seldom simple to read or write, and usually doesn't take advantage of hardware acceleration. When I think demoscene, I think of getting crazy effects through esoteric bit manipulations. When you're already shipping OpenGL and your whole UI is composited with that, the easiest option is probably just texture mapping on to a low-resolution mesh.
Usually the app just gets rejected if someone uses an undocumented feature. Jailbreakers or people developing just for fun or using the adhoc or (I think) corporate deployment method don't go through the approval process and therefore can't get banned/rejected. So for people in those situations, it's fun to know how to do it.
Please do this instead: http://amarsagoo.info/tofu/