summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-06-10 17:50:43 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2019-06-10 17:50:43 -0400
commitb8f49c293215707650a7f3b1d69403b359059c4a (patch)
tree7d793e21cd57e20bde18fad082998a3e4532ce26
parent231f9ca2784217a1b454999cf1ebc9410207f85b (diff)
Added "How it works" section to README.md0.0
-rw-r--r--README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index 00a1235..bafd6d5 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,20 @@ To run AutoDistortion on an image, download one of the [releases](https://github
Only PNG and JPG images are supported so far.
+## How it works
+
+AutoDistortion works by randomly generating two functions, X(x, y) and Y(x, y), for example:
+
+```
+X(x, y) = 2x + 3y
+Y(x, y) = sin(7y)
+```
+
+Then, the color of the pixel at (x, y) in the output image will be the color of the pixel at (X(x, y) modulo width, Y(x, y) modulo height) in the input image (where width and height are the dimensions of the input image).
+
+To make sure that images at different resolutions are treated the same, AutoDistortion divides x and y by the width and height of the image respectively before doing this.
+
+
## Building AutoDistortion from source
To build AutoDistortion, simply run