29 lines
892 B
Markdown
29 lines
892 B
Markdown
# image-triangles
|
|
|
|
Makes a [voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram) and fills each cell with the average color the image below in.
|
|
|
|
### examples
|
|

|
|

|
|

|
|

|
|

|
|

|
|
|
|
|
|
### to run:
|
|
|
|
#### with nix
|
|
|
|
```
|
|
nix run --experimental-features "nix-command flakes" ".#" -- --minDistance 0.02 --input examples/birds-eye-view.png --output output.jpeg
|
|
```
|
|
|
|
#### with cabal
|
|
Install [cabal & ghc](https://www.haskell.org/ghcup/) if you don't have them.
|
|
|
|
```
|
|
cabal update
|
|
cabal run image-triangles -- --minDistance 0.02 --input examples/birds-eye-view.png --output output.jpeg
|
|
```
|
|
|