Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Add a tear effect to the borders of an image
ResourceFunction["PaperTear"][image] adds a tear to the bottom border of image. | |
ResourceFunction["PaperTear"][image,sides] adds tears to image along the edges specified by sides. |
| "TearEdges" | {Bottom} | specifies the list of edges to be torn, e.g. {Top,Bottom,Left} |
| "Roughness" | 2 | sets the thickness of the tear effect for all torn edges |
| "Border" | True | set to True to add a border to to untorn edges |
| "Shadow" | True | set to True to add a shadow to the final image |
| "ShadowOffset" | {0,2} | specify shadow offset in pixels for the x and y axes |
| "ShadowTransparency" | 0.2 | specify transparency for shadow effect |
| "ShadowBlur" | 7 | specify the blur radius in pixels for shadow effect |
| "Cropped" | True | set to True to crop the border off untorn edges |
Tear the bottom edge off an image:
| In[1]:= | ![]() |
| Out[1]= | ![]() |
Tear the left and bottom edges of an image:
| In[2]:= | ![]() |
| Out[2]= | ![]() |
Tear the bottom and right edges of an image and leave a blurred shadow along the non-torn edges:
| In[3]:= | ![]() |
| Out[3]= | ![]() |
PaperTear can work with Graphics and Graphics3D:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
Use the "Cropped" option to remove shadows on the non-torn edges:
| In[5]:= | ![]() |
| Out[5]= | ![]() |
Leave the shadow on along the non-torn edges:
| In[6]:= | ![]() |
| Out[6]= | ![]() |
Use "Roughness" to specify the thickness of torn edges. Add a thin tear to the bottom of an image:
| In[7]:= | ![]() |
| Out[7]= | ![]() |
Add a vertical offset to the shadow:
| In[8]:= | ![]() |
| Out[8]= | ![]() |
Use "ShadowTransparency" to adjust the opacity of the shadow:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
Use "ShadowBlur" to set the blur radius for the added shadows:
| In[10]:= | ![]() |
| Out[10]= | ![]() |
Option "Cropped" not working properly for mixed directions of "TearEdges":
| In[11]:= | ![]() |
| Out[11]= | ![]() |
Unable to add horizontal offset to shadows:
| In[13]:= | ![]() |
| Out[13]= | ![]() |
When "ShadowTransparency" is large enough, a border can sometimes be seen on the non-torn edges, even if the "Border" option is set to False:
| In[14]:= | ![]() |
| Out[14]= | ![]() |
Top of image gets cropped out when vertical offset for "ShadowOffset" is too high:
| In[15]:= | ![]() |
| Out[15]= | ![]() |
Wolfram Language 14.0 (January 2024) or above
This work is licensed under a Creative Commons Attribution 4.0 International License