| 1 | Running |
|---|
| 2 | ======= |
|---|
| 3 | |
|---|
| 4 | Compilation: |
|---|
| 5 | g++ pdfcube.cc `pkg-config pigment-0.3 poppler-glib poppler gdk-pixbuf-2.0 glib-2.0 --cflags --libs` |
|---|
| 6 | |
|---|
| 7 | Usage |
|---|
| 8 | ./a.out file://`pwd`/test3.pdf |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | Animations |
|---|
| 12 | ========== |
|---|
| 13 | |
|---|
| 14 | Right now it's all a mess. There is a sketch of an api proposal to be |
|---|
| 15 | used by some kind of animation strategy and not much more. |
|---|
| 16 | |
|---|
| 17 | In the main I'm experimenting with cover flow animations. I think one |
|---|
| 18 | "pretty" way of doing cover flow is to align the slides along (tangent |
|---|
| 19 | to, seen from above) a function like the following (gnuplot). |
|---|
| 20 | |
|---|
| 21 | > unset parametric |
|---|
| 22 | > plot [-500:500] +1/((sqrt(sqrt(-x)))+1), +1/((sqrt(sqrt(x)))+1/1) |
|---|
| 23 | |
|---|
| 24 | While the distance from the center of the scene should be: |
|---|
| 25 | |
|---|
| 26 | > set parametric |
|---|
| 27 | > plot sqrt(t),0 with linespoints |
|---|
| 28 | |
|---|
| 29 | Once the key point of the animation are choosen (some scaling is |
|---|
| 30 | likely to be needed to achieve good results) the strategy can simply |
|---|
| 31 | move the slides linearly between points: I think this linearization |
|---|
| 32 | will not be noted by the eye. |
|---|
| 33 | |
|---|
| 34 | Animations should be put in some kind of class or module so that they |
|---|
| 35 | can be easily added/changed. |
|---|
| 36 | |
|---|
| 37 | Note: if we want to do some rotations and translations with linear |
|---|
| 38 | algebra a library such as Boost uBlas could be helpful. |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | PDF Animations Mapping |
|---|
| 42 | ====================== |
|---|
| 43 | |
|---|
| 44 | POPPLER_PAGE_TRANSITION_REPLACE |
|---|
| 45 | ------------------------------- |
|---|
| 46 | |
|---|
| 47 | Plain switch. |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | POPPLER_PAGE_TRANSITION_SPLIT |
|---|
| 51 | ----------------------------- |
|---|
| 52 | |
|---|
| 53 | Some kind of page split. Think of having two halves of the page with |
|---|
| 54 | complementary alpha channels. |
|---|
| 55 | |
|---|
| 56 | \ |
|---|
| 57 | \ |
|---|
| 58 | \+-----+ |
|---|
| 59 | |\ |\ |
|---|
| 60 | | \ | \ |
|---|
| 61 | | \ | \ |
|---|
| 62 | \ | \ | |
|---|
| 63 | \ | \| |
|---|
| 64 | \+-----+\ |
|---|
| 65 | \ |
|---|
| 66 | \ |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | POPPLER_PAGE_TRANSITION_BOX |
|---|
| 71 | --------------------------- |
|---|
| 72 | |
|---|
| 73 | This can be mapped to the cube. |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | POPPLER_PAGE_TRANSITION_FLY |
|---|
| 77 | --------------------------- |
|---|
| 78 | |
|---|
| 79 | This could be some slide fading while rapidly going towards the |
|---|
| 80 | viewer. |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | POPPLER_PAGE_TRANSITION_PUSH |
|---|
| 84 | ---------------------------- |
|---|
| 85 | |
|---|
| 86 | Could be the opposite of fly. |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | POPPLER_PAGE_TRANSITION_FADE |
|---|
| 90 | ---------------------------- |
|---|
| 91 | |
|---|
| 92 | Normal fading |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | The following transition codes are free for future usages: |
|---|
| 96 | POPPLER_PAGE_TRANSITION_BLINDS, POPPLER_PAGE_TRANSITION_WIPE, |
|---|
| 97 | POPPLER_PAGE_TRANSITION_DISSOLVE, POPPLER_PAGE_TRANSITION_GLITTER, |
|---|
| 98 | POPPLER_PAGE_TRANSITION_COVER, POPPLER_PAGE_TRANSITION_UNCOVER |
|---|