https://github.com/jamis/amazing-desktops
A simple utility for generating random abstract images (using mazes) for use as desktop wallpaper.
https://github.com/jamis/amazing-desktops
Last synced: about 2 months ago
JSON representation
A simple utility for generating random abstract images (using mazes) for use as desktop wallpaper.
- Host: GitHub
- URL: https://github.com/jamis/amazing-desktops
- Owner: jamis
- Created: 2015-03-19T17:28:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-05-08T22:09:06.000Z (about 6 years ago)
- Last Synced: 2025-04-23T20:50:35.123Z (about 1 year ago)
- Language: C
- Size: 526 KB
- Stars: 20
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Amazing Desktops
This is a utility (*cough* toy *cough*) for generating random images
suitable for desktop backgrounds. These images are created by generating
large random mazes and coloring them using Dijkstra's algorithm.
(Get it? A-MAZE-ing? I so kill me.)
Here are a few sample images to get you hungry for more...



## Installation
The only dependency is libpng, which most systems probably have
preinstalled. If yours complains when you try to build this, then yeah,
you'll want to take care of that.
Assuming your dev environment is set up, the following ought to work:
$ make
Yup, just that. This will build a `maze` executable in the current
directory.
## Usage
Running without any arguments will generate a 640x480 image, suitable
for previewing. It will use a random color scheme:
$ ./maze
You can customize the output by passing any of the following arguments:
* `maze s12345678` -- uses the given number to seed the random number
generator. This lets you (for example) share a result without having
to send a large image.
* `maze w500` -- sets the width of the image to 500 pixels
* `maze h500` -- sets the height of the image to 500 pixels
* `maze q` -- quiet mode (don't write info to the console)
* `maze c112233ff` -- adds the given color to the color scheme (the color
is a 32-byte RGBA value in hexadecimal format (rrggbbaa). You may
specify up to 100 such entries (though images look best with 5-10).
* `maze p-` -- does not draw the longest path.
* `maze p112233ff` -- draws the longest path through the maze in the
given RGBA color.
* `maze ga` -- use the built-in "autumn" color scheme
* `maze g10` -- generate a random color scheme consisting of 10 colors
* `maze obackground.png` -- write the maze to the file `background.png`
* `maze agl` -- generate a maze using the "growing tree" algorithm,
specifically it's "choose last" variant. Available options are:
* `a*` -- choose algorithm randomly (the default)
* `agl` --- "choose last" growing tree
* `agw` --- weighted growing tree
* `ab` --- binary tree algorithm
* `aa` --- Aldous-Broder algorithm
* `ars` --- recursive-subdivision algorithm
* `maze b0` -- sets the blur radius to 0 (disabling smoothing)
* `maze b1` -- sets the blur radius to 1, making each pixel effectively 3 pixels wide (the pixel itself, and extending `radius` pixels on each side). The extra pixels are blurred, making the image softer. Larger values for the blur radius will take (possibly MUCH) longer to draw.
For example:
$ ./maze w1366 h768 g10
The above generates a 1366x768 maze and a color scheme (consisting of
ten colors). The result is then saved to `maze.png`.
## Related (Shameless Plugs)
If you like this, you might also enjoy my book, "Mazes for Programmers":
https://pragprog.com/book/jbmaze/mazes-for-programmers
Information about twelve different maze generation algorithms, lots of
maze-related projects, as well as a demonstration of how to use
Dijkstra's algorithm to achieve the kinds of color effects that
this project uses.
## Authors
Jamis Buck (jamis@jamisbuck.org)
## License
Creative Commons Attribution 4.0 International License

This work is licensed under a Creative Commons Attribution 4.0 International License.