Today, I used eread8.0 (which can be used to read cartoons) to do a good job, that is, there are too many advertisements and many functional limitations. I don't like it very much.
The user experience of turning pages on eread is very good. Here I will give a general introduction to the algorithm ideas for implementing this effect.
Paging algorithm
Input: Four images of the same size (P1, P2, P3, P4) and the current coordinate of the mouse (x, y)
Output: merged flip image P
Algorithm steps:
(1) draw images P1, P4;
Triangle
Quadrilateral
(2) Calculate the part to be displayed in P3. This part may be a triangle or a quadrilateral and be drawn;
(3) Calculate the part to be displayed in P2. This part may be a triangle or quadrilateral. Perform the displacement and Rotation Processing before drawing and draw the part;
Note:
Currently, most advanced languages support partial display of images. As for image conversion, if the language itself does not support manual writing, you can refer to the textbook of the shape learning, so all the steps mentioned above are simple and feasible.
Page turning results advanced processing:
(1) The shadow effect, which can be recognized by the human eye, plays a very important role in light and shadow. In fact, Light and Shadow are just different in light and shade. This effect should be relatively simple to implement;
(2) page curvature. During page turning, P2 should be a curved surface. This part may be difficult to calculate. If the surface effect can be reasonably used, users can feel the feeling of entity books more realistically.