| Crates.io | algoart |
| lib.rs | algoart |
| version | 0.0.2 |
| created_at | 2024-12-24 07:49:44.88259+00 |
| updated_at | 2025-01-12 12:11:52.365931+00 |
| description | Algorithmic Art CLI: A Command-Line Tool for Creating Generative Art |
| homepage | |
| repository | https://github.com/obaraelijah/algoart |
| max_upload_size | |
| id | 1493726 |
| size | 161,397 |
Machine Generated Art, is a rust crate and CLI application for generating algorithmic art.
Note that you need to have the rust toolchain installed on your
computer if you want to install algoart using cargo.
Algoart is distributed via crates.io and can be installed with:
cargo install algoart
If you'd like to install a specific version of algoart, use the
--version flag:
cargo install --version $VERSION
If you have an old version of algoart already installed and wish to
update it to the newest version, use the --force flag:
cargo install --force algoart
Check that algoart is successfully installed by running:
algoart -V
This should print algoart, followed by the version you have installed.
For development or if you would like to work with the latest, unstable version, you can install algoart from source. Note that you need to have the rust toolchain installed on your computer, if you want to build algoart from source. First, clone the algoart repository and enter it:
git clone https://github.com/obaraelijah/algoart && cd algoart
If you want to work inside this directory, potentially because you wish to contribute to algoart, you can execute the CLI application like this:
cargo run --release -- $FILE
$FILE being the path to the file containing your algorithms (see the
Example section).
Note that adding the --release flag to the command significantly
enhances the execution speed.
You can also install Algoart from source, rather than just working from
the source directory.
Do so by running the following command in the Algoart source directory:
cargo install --path .
This will compile Algoart and make the program available for your user to execute directly from the command line.
Check installation by running:
algoart -V
If you run algoart -h, you will find that algoart takes a single file as
input argument.
The content of the file contains the configuration for the art
pieces you wish to generate.
Currently, Algoart supports Json and Jsonnet
input files.
The input file contains an array of algorithm objects where each one
describes an artwork you would like to create.
This is an example Json file that would generate a single artwork, a
rendering of a buddhabrot:
[
{
"algorithm": "buddhabrot",
"filename": "buddhabrot_20000.png",
"width": 3800,
"height": 2000,
"center": {
"im": -0.35,
"re": 0
},
"zoom": 0.45,
"exponent": 2,
"iter": 20000,
"rotation": 90,
"sample_count": 500000000,
"sampler": {
"r": 3,
"type": "uniform_polar"
},
"post_processing": [
{
"process": "normalize"
},
{
"bin_count": 256,
"contrast_limit": 500,
"process": "clahe",
"tile_size_x": 380,
"tile_size_y": 200
},
{
"h": 0.0005,
"n": 7,
"process": "smoothing",
"type": "non_local_means",
"window_size": 21
}
],
"color_map": {
"gradient": {
"factor": 1,
"type": "linear"
},
"map": [
{
"b": 0,
"g": 0,
"r": 0,
"type": "rgb"
},
{
"b": 255,
"g": 255,
"r": 255,
"type": "rgb"
}
]
}
}
]
You simply run algoart $FILE and Algoart does the rest for you.
The resulting image looks like:

You can find more example artworks and their configuration in the
examples/ folder here.
Below you will find a list of algorithms either already supported by Algoart or planned to be supported in a future release.
Algorithms for creating various types of fractal art.
Buddhabrot
Anti-Buddhabrot
Nebulabrot
Fractal Flames
Newton Fractals
Strange Attractors
L-Systems
DeepDream-like filter
Text-to-image
Contributions are very welcome! See CONTRIBUTING.md for details. When you contribute, make sure to follow the Contributor Covenant v2.1.
Algoart is licensed under the MIT license. See LICENSE for details.