
Apple's iBooks Dynamic Page Curl - jeff18
http://blog.steventroughtonsmith.com/2010/02/apples-ibooks-dynamic-page-curl.html
======
blasdel
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).

Please do this instead: <http://amarsagoo.info/tofu/>

~~~
BigZaphod
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.

~~~
pieter
I think that's changing in the iPad SDK

~~~
st3fan
It is nice to have Core Text, but will they also provide it on the iPhone?

------
Tichy
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?

~~~
derefr
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?

†
[http://www.theonion.com/content/news/report_90_of_waking_hou...](http://www.theonion.com/content/news/report_90_of_waking_hours_spent)

------
frankus
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?

~~~
samlittlewood
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.

~~~
DLWormwood
> 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.

~~~
wtallis
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.

~~~
hexley
Finally, a voice of clarity.

