Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pattern-based Distortion Generator #242

Closed
jboarman opened this issue Mar 6, 2023 · 6 comments · Fixed by #272 or #276
Closed

Add Pattern-based Distortion Generator #242

jboarman opened this issue Mar 6, 2023 · 6 comments · Fixed by #272 or #276
Assignees
Labels
enhancement New feature or request experimental Functionality that may be too risky to develop or release

Comments

@jboarman
Copy link
Member

jboarman commented Mar 6, 2023

Printed documents often include artifacts that may come from the paper textures, printing presses, etc.

The geopatterns python port offers a potential avenue for generating such patterns that could be processed a bit and merged into the paper layer. Brandon Mills offers a web-based demo of geopatterns.

Below is an illustrative example that comes from the Tai Le Historical Document Image Binarization Dataset 2021:
image

@jboarman jboarman added enhancement New feature or request experimental Functionality that may be too risky to develop or release labels Mar 6, 2023
@jboarman
Copy link
Member Author

jboarman commented Mar 8, 2023

Voronoi and Delaunay tessellation offer another method to generate patterns that could be sampled and applied for generating distortions. This is particularly appealing since there are readily available python implementations that could be more quickly leveraged:

Voronoi Tessellation
image

Delaunay Tessellation
image

Voronoi vs Delaunay Tessellation
image

Additionally, colorized implementations can be generated based on a source image where the color of each shape is determined by the average color of each corner and the center of the polygon1. Further, this may serve as a potential shortcut for implementing wrinkled paper.

image

Footnotes

  1. https://github.com/MauriceGit/Delaunay_Triangulation

@jboarman
Copy link
Member Author

Related concept, using aperiodic tiling

An aperiodic monotile
David Smith, Joseph Samuel Myers, Craig S. Kaplan, and Chaim Goodman-Strauss, 2023

An aperiodic monotile, sometimes called an "einstein", is a shape that tiles the plane, but never periodically. In this paper we present the first true aperiodic monotile, a shape that forces aperiodicity through geometry alone, with no additional constraints applied via matching conditions. We prove that this shape, a polykite that we call "the hat", must assemble into tilings based on a substitution system. The drawing above shows a patch of hats produced using a few rounds of substitution.

This page collects the resources associated with this work. We invite you to look at all of the following.
https://cs.uwaterloo.ca/~csk/hat/

image

@ss756 ss756 moved this from Todo to In Progress in Augraphy Roadmap Mar 24, 2023
@jboarman
Copy link
Member Author

jboarman commented Apr 2, 2023

Organic Patterns

This "pattern" is more organic and random-looking, but still consistent enough to think of it as a pattern. In this case, the pattern would be combined with a deboss function (see #164) when rendered to the paper layer.
image

Use of Skeletonize Function

These organic patterns show the use of the skeletonize function which might be useful when applied to noise to generate organic-looking patterns:
image

Perlin Noise as Probability Function

Using Perlin noise (see background of this image) could also be used as a probability function for placement of shapes on a layer:
image

@jboarman
Copy link
Member Author

jboarman commented Apr 9, 2023

While subconsciously searching for what a "pattern" even means, I noticed this paper from a mailed envelope containing tax information intended to obscure its contents.

Wikepedia has some notes on patterns from nature that also reflect on these ideas.

So far, I think patterns have the following characteristics:

  • repetition
  • structure, generally involving repeating shapes
  • mostly regular, but could also be locally stochastic while globally averaging towards an overall regular shape or family of shapes
  • interactions of shapes (whether same or dissimilar shapes)
  • types of shapes may be infinite, but include all the standard geometries, including dots, lines, circles, polygons (triangles, rectangles, etc), waves

image

@jboarman
Copy link
Member Author

Errors in Perlin Noise Makes Interesting Patterns

https://stackoverflow.com/questions/26611906/strange-result-from-perlin-noise-generator
image
image

@ss756 ss756 moved this from In Progress to Done in Augraphy Roadmap Apr 14, 2023
kwcckw added a commit that referenced this issue Apr 16, 2023
Added new augmentations for Pattern Distortion. #242
@jboarman
Copy link
Member Author

jboarman commented Apr 17, 2023

This repo some experiments with "plane-filling curves" and Fourier transforms that are interesting for considering future types of patterns.

There's more details on a number of space-filling curve techniques on wikipedia.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request experimental Functionality that may be too risky to develop or release
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants