new README and examples
with caveats about blanks & square pictures
This commit is contained in:
parent
67c7962634
commit
8ad7407935
7 changed files with 22 additions and 8 deletions
24
README.md
24
README.md
|
|
@ -1,15 +1,29 @@
|
||||||
# image-triangles
|
# image-triangles
|
||||||
|
|
||||||
|
Makes a [voroni diagram](https://en.wikipedia.org/wiki/Voronoi_diagram) and fills each cell with the average color the image below in. Please note, there's currently a bug, only square images will work. Additionally, some cells will be blank.
|
||||||
|
|
||||||
### examples
|
### examples
|
||||||

|
<!--  -->
|
||||||

|
<!--  -->
|
||||||

|

|
||||||

|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
### to run:
|
### to run:
|
||||||
|
|
||||||
|
#### with nix
|
||||||
|
|
||||||
|
```
|
||||||
|
nix run --experimental-features 'nix-command flakes' -- --cornerCount 800 --input examples/birds-eye-view.png --output output.svg
|
||||||
|
```
|
||||||
|
|
||||||
|
#### with cabal
|
||||||
Install [cabal & ghc](https://www.haskell.org/ghcup/) if you don't have them.
|
Install [cabal & ghc](https://www.haskell.org/ghcup/) if you don't have them.
|
||||||
|
|
||||||
```
|
```
|
||||||
cabal update
|
cabal update
|
||||||
cabal run image-triangles -- --cornerCount 800 --input examples/sierra.jpg --output output.svg
|
cabal run image-triangles -- --cornerCount 800 --input examples/birds-eye-view --output output.svg
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
BIN
examples/birds-eye-view.png
Normal file
BIN
examples/birds-eye-view.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 MiB |
3
examples/birds-eye-view.svg
Normal file
3
examples/birds-eye-view.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 3.4 MiB |
BIN
examples/luna-but-square.jpeg
Normal file
BIN
examples/luna-but-square.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 MiB |
0
examples/luna-but-square.svg
Normal file
0
examples/luna-but-square.svg
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 MiB |
Loading…
Add table
Add a link
Reference in a new issue