Go to file
Niles Rogoff 233618bf03
Readme updated with examples
2017-03-19 21:50:32 -04:00
garbage Readme updated with new features 2017-03-19 21:40:15 -04:00
interesting Readme updated with new features 2017-03-19 21:40:15 -04:00
mildly interesting Readme updated with new features 2017-03-19 21:40:15 -04:00
sample Readme updated with examples 2017-03-19 21:50:32 -04:00
very small patterns Add support for greyscale and highest order bit generation 2017-03-19 19:54:59 -04:00
generator.py Readme updated with new features 2017-03-19 21:40:15 -04:00
readme.md Readme updated with examples 2017-03-19 21:50:32 -04:00

readme.md

Generate images from a random pattern

Someone on fractalforums gave me the idea of creating random images based on mathematical operations

This generates a random set of operators and a random set of operands, either x, y or a random number, and composes them into a formula.

It then generates an image using the lowest order bit of the result of that formula for each pixel.

For example, if it generated the formula ((((x ^ y) - y) * x) >> 11) & 1, then the output would look like this

Dependencies

Depends on libpme (pip3 install libpme)

Usage

python3 generator.py [mode]

mode can be one of high or greyscale. If left blank, it generates an image using the lowest bit of the result of the formula. If set to high, it will use the highest bit of the result. If set to greyscale, it will use the result of the formula as a shade of grey, truncated to one byte for png.

Examples

This is an example with the formula (((((10) >> y) + x) + y) & x) ÷? y

This is an example with the formula (((((x) ^ x) ^ x) - y) & y) ÷? 15

This is what high looks like for the formula ((y) * x) ** x:

and for ((((((y) * y) * 5) ** x) + 7) - y) * x

and this is what it looks like for greyscale with the formula (((((12) | y) - 11) - x) & x) ^ x

and for ((((x) & y) - x) + y) + 11