Skip to content

danieledapo/mattors

Repository files navigation

Matto Build Status

Have some fun visualizing math.

Fractals

redblue dragon mandelbrot horns fractal tree sierpinski

Quantization

desert-quantized baboon-quantized

Primirs

inspired by primitive.

rb-primitized tiffanys-primitized

Voronoi

voronoi voronoi-gradient

Delaunay

delaunay

Patchwork

inspired by this article.

patchwork patchwork-filled1 patchwork-filled2

Stippling

stippling-gradient stippling-rects

Mondrian

inspired by Composition in Red, Blue and Yellow by Mondrian.

mondrian1 mondrian2

Tangled webs

inspired by https://www.inconvergent.net/2019/a-tangle-of-webs/.

tangled-webs

Examples

# fractals
cargo run -- dragons
cargo run -- horns
cargo run -- julia
cargo run -- julia --iterations 16 mandelbrot
cargo run -- julia --iterations 128 custom -c ' -0.4+0.6i' --start " -3.0,-1.2" --end "2.0,1.2"
cargo run -- sierpinski --fancy
cargo run -- fractal-tree

# quantize
cargo run -- quantize images/desert.jpeg -o images/desert-quantized.jpeg
cargo run -- quantize -d 1 images/baboon.jpeg -o images/baboon-quantized.jpeg

# primirs
cargo run --release -- primirs --shapes 200 --mutations 150 -o images/rb-primitized.png --dx 8 --dy 8 images/rb.png
cargo run --release -- primirs --shapes 200 --mutations 100 --scale-down 2 --dx 16 --dy 16 -o primitized.png images/tiffanys.jpg

# voronoi
cargo run -- voronoi --points 150 -o images/voronoi.png
cargo run -- voronoi --gradient-background --points 150 -o images/voronoi-gradient.png

# delaunay
cargo run -- delaunay --grid-size 50 -o images/delaunay.png

# patchwork
cargo run -- patchwork
cargo run --release -- patchwork -f --points 4000 --width 600 --height 600 --clusters 10

# stippling
cargo run -- stippling gradient -p 1000 -k 5
cargo run -- stippling rects --iterations 1500

# Mondrian
cargo run -- mondrian -w 800 -h 800

# tangled webs
cargo run -- tangled-web

# misc
cargo run -- runes -p 3 -c 26
cargo run -- dither -c 2 images/desert.jpeg
cargo run -- dither -c 5 --rgb images/desert.jpeg