A Generative Art tool in Rust!
This was inspired by Isaacg1's Programatically Generated Artwork .
Make sure you have Rust and Cargo installed.
Install this project on any platform using Cargo:
$ cargo install --git https://github.com/wcygan/turtle
$ turtle -s <size> -n <name> -p <pattern>
The program options that can be used:
Option | Usage | Example |
---|---|---|
-s |
Number of pixels, N, to create an N x N image | -s 10 |
-r |
Seed used to initialize a pseudorandom number generator | -r 1234 |
-n |
Name of the output file | -n foo |
-p |
Image pattern to use | -p square |
-x |
Imaginary part of a complex number | -x -0.55 |
-y |
Real part of a complex number | -y 0.53 |
-i |
Number of times to executed iterated algorithms | -i 105 |
$ turtle -n mandelbrot-fractal -p mandelbrot-fractal -s 8000 -x -0.5 -y 0.5 -i 104
$ turtle -n julia-fractal -p julia-fractal -s 3000 -x -0.55 -y 0.53 -i 105
$ turtle --pattern squiggly --name bar --size 1500
$ turtle -n julia-weird -p julia-weird -s 8000 -x -0.596 -y 0.555 -i 60
$ turtle --name blobs --pattern blobs --rng 14415323423445943 --size 3000
$ turtle --pattern airbrush --name airbrush --size 2000
$ turtle --size 2000 --pattern tree --rng 12 --name tree
$ turtle --size 1000 --name diamond --pattern diamond --rng 124331
$ turtle --size 1000 --name snowflake --pattern snowflake --rng 12494213
$ turtle --name pixels --size 2000 --pattern pixels
$ turtle --size 350 --name square --pattern square --rng 2121
$ turtle --size 350 --name circle --pattern circle --radius 99479
- clap to parse commands
- image to create images
- rand to generate pseudorandom numbers
- rayon to parallelize execution
- num-complex for complex math'
$ tree
.
├── Cargo.lock
├── Cargo.toml
├── examples
│ ├── airbrush.png
│ ├── blobs.png
│ ├── circle.png
│ ├── diamond.png
│ ├── julia-fractal.png
│ ├── julia-weird.png
│ ├── mandelbrot-fractal.png
│ ├── pixels.png
│ ├── snowflake.png
│ ├── square.png
│ ├── squiggly.png
│ └── tree.png
├── readme.md
└── src
├── algorithms
│ ├── airbrush.rs
│ ├── blobs.rs
│ ├── circle.rs
│ ├── diamond.rs
│ ├── julia_fractal.rs
│ ├── mandelbrot_fractal.rs
│ ├── mod.rs
│ ├── pixels.rs
│ ├── snowflake.rs
│ ├── square.rs
│ ├── squiggly.rs
│ └── tree.rs
├── arguments.rs
├── dispatcher.rs
└── main.rs