DEFINITELY NOT A GRID
This is my creation for Genuary 2023, day 18. Genuary is an artificially generated month of time when we create beautiful things. There are 31 prompts, one for each day.
The eighteenth prompt for Genuary 2023 was "definitely not a grid". I used a randomized rectangle subdivision algorithm to create slowly evolving structures that are definitely not grids, a breathing system of rectangles filled with textures that dissolve into static.
The source code is kept quite readable, even with some comments, not hyper optimized, but still is less than 5500 characters.
Thanks to Ivan Dianov and Stranger in the Q for sharing an idea that led to this subdivision algorithm.
KEYBOARD SHORTCUTS
F -- Toggle fullscreen mode
1-9 -- Set speed (default=6)
0 -- Pause everything
X -- Pause only motion (but not noise)
URL OPTIONS
You can append these options as GET parameters to the URL of the HTML script.
speed -- Set initial speed. You can also use negative numbers to go even slower than setting 1. Similarly you can use numbers larger than 9 to go even faster. Default=6.
mres -- Resolution multiplier. Set to 2 or 3 to get an image with more pixels than your display. Default=1.
seed -- Random seed. Set this to any string or number to get the same movement sequence every time. When not set, based on computer time. Default=unset.
quality -- Anti-aliasing quality. Default=6. Higher values produce less noise (which is intended as part of the piece, so adjust to taste). Try setting to 1 on low powered devices to get full framerate. Also try setting to 1 if you like noise.
Copyright 2023 by Piter Pasma. https://piterpasma.nl