Improved Book Binding Effect
Some noted features that we can learn from carolineminuscule-groundtruth examples:
- Opposing curled page could reveal another page of content
- Opposing curled page could have multiple pages
- Page edging can be more separated and slightly wavy

This should be updated from this pull request: https://github.com/sparkfish/augraphy/pull/189.
The update by @kwcckw in #189 is very impressive!
@ss756 Perhaps you can look at this one to make a few improvements.
The BookBinding class currently defines a number of parameters, so some of this may just be an issue of the values in the demo image may just need to be tuned. Please evaluate whether defaults need to be adjusted to be more realistic and common.
class BookBinding(Augmentation):
"""Creates a book binding effect with shadow and curved lines
:param radius_range: The range of radius in pixels.
:type radius_range: tuple, optional
:param curve_range: Pixels by which the page text should be curved, suggested value is 1/8 of image width.
:type curve_range: tuple, optional
:param mirror_range: Tuple of floats to determine percentage of image to be mirrored.
:type mirror_range: Tuple, optional
:param curling_direction: The direction of page curling, -1: random, 0: up, 1: down.
:type curling_direction: int, optional
:param p: The probability that this Augmentation will be applied.
:type p: float, optional
"""
Here is some feedback to guide you (based purely on the examples from #189):
- Use lighter shading in the dark regions of the inner binding
- Add support for specifying a
backdrop_colororbackdrop_imagesource where either can be a fixed string or a generator source - Reduce the exaggerated displacement of the page and ensure this is parameterized
- Adjust the curl to be more natural and assumes a more upward/downward motion
- Test parameterization to ensure range of curves are supported (e.g., from more flat to more curved)
- Add shadow under image at bottom (or top) around the displaced edges of the book, based on direction of curl



The arc of the bend is more realistic in the most recent update, especially with regard to the relationship with the mirror page. Using the page cache is another nice touch!
Is it possible to restore the less-uniform and more natural variation in how each page waves a small amount into an imperfect stack of pages (similar to the real example provided at the top of this issue)?
Also, can you produce a less-exaggerated example of the bending effect? The default arc values should also be very plain in that regard .. the bend would be primarily for the opposing page, whereas the primary page should be more flat (most of the time).
Is it possible to restore the less-uniform and more natural variation in how each page waves a small amount into an imperfect stack of pages (similar to the real example provided at the top of this issue)?
That was the prior PageBorder effect. To create those non uniform stacked pages in different angles, further improvement will be needed in PagBorder. Right now we can generate a PageBorder effect with uniform angle rotation, but not with non uniform angle rotation. I will include this in the next few updates.
Also, can you produce a less-exaggerated example of the bending effect? The default arc values should also be very plain in that regard .. the bend would be primarily for the opposing page, whereas the primary page should be more flat (most of the time).
Right now the bending are applies evenly for both of the pages, an example of less curvy effect:
If we need a different bending value for both pages, where more bending in the left image and less bending in the right image, we will need another parameters to specify bending value for both pages. Further development will be needed since different bending value may cause a different y offset in both pages and i will need to perform some experiments first to merge both pages correctly.
This is now resolved with this update: https://github.com/sparkfish/augraphy/pull/324