All Projects → rh12503 → triangula-cli

rh12503 / triangula-cli

Licence: MIT license
No description or website provided.

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to triangula-cli

triangula
Generate high-quality triangulated and polygonal art from images.
Stars: ✭ 3,775 (+17876.19%)
Mutual labels:  triangula

Triangula CLI

A CLI app which uses Triangula to generate triangulated images. For a simpler interface consider using the GUI.

Explanation of the algorithm

Running the algorithm saves a .json file every specified number of repetitions. This file contains data with the best set of the points from the algorithm. This file can then be rendered to a PNG or SVG.

Running

Run the algorithm using the command:

triangula run -img <path/to/your/image> -out <path/to/save/file>

For almost all cases, only changing the number of points and the shape type and leaving all other options with their default values will generate an optimal result.

To change the shape type use the flag:

-shape [triangles|polygons]

For a list of available options, run:

triangula run -help

Rendering

There are 2 image formats which the .json file can be rendered to: SVG and PNG. PNG is currently the only format that supports effects.

To change the shape type use the flag:

-shape [triangles|polygons]

SVG

Renders the .json file to a SVG.

Usage:

triangula render -in path/to/json -out path/to/save/svg

Options:

triangula render -help

PNG

Renders a .json file generated by the algorithm to a PNG. There are also multiple effects that can be applied to the output.

Usage:

triangula render -in path/to/json -out path/to/save/svg -img <path/to/your/image>

To add an effect, add the flag:

-effect [none|gradient|split]

Options:

triangula render -i . -o . -img . png -help
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].