Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tw1ddle/geometrize-haxe-example
Minimal example using the Geometrize Haxe library, a tool for geometrizing images
https://github.com/tw1ddle/geometrize-haxe-example
art geometrize haxe hill-climbing
Last synced: about 1 month ago
JSON representation
Minimal example using the Geometrize Haxe library, a tool for geometrizing images
- Host: GitHub
- URL: https://github.com/tw1ddle/geometrize-haxe-example
- Owner: Tw1ddle
- License: mit
- Created: 2019-07-06T00:25:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-26T00:00:52.000Z (about 3 years ago)
- Last Synced: 2024-12-06T18:55:20.319Z (3 months ago)
- Topics: art, geometrize, haxe, hill-climbing
- Language: Haxe
- Homepage: https://www.geometrize.co.uk/
- Size: 2.28 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.geometrize.co.uk/)
[](https://github.com/Tw1ddle/geometrize-haxe-example/blob/master/LICENSE)
[](https://ci.appveyor.com/project/Tw1ddle/geometrize-haxe-example)Minimal example of the [Geometrize Haxe library](https://github.com/Tw1ddle/geometrize-haxe/), a Haxe library for converting images into shapes.
## Building
Install the dependencies:
```
haxelib install hxcpp
haxelib install format
haxelib install mcli
haxelib install Sure
```Either open the project folder in VSCode, or run Haxe from the command line:
```
haxe GeometrizeHaxeExample.hxml
```## Usage
This demo works on the C++ target. Move the built binary to the [sample images](https://github.com/Tw1ddle/geometrize-haxe-example/tree/master/sample_images) folder and start geometrizing some images. Pass command line options to specify the options the program should use for converting images into shapes.
```
# Create an image made of 400 circles
./Main.exe -i sliced_fruit.png -o sliced_fruit_out.png -t circle -s 400
```[](https://www.geometrize.co.uk)
## Options
Flag | Description | Default |
--------------- | ---------------| ---------|
i | The filepath to load the input image from | n/a
o | The filepath to save the output image, JSON data or SVG | n/a
t | The type of shape to use | One of: rectangle, rotated_rectangle, triangle, ellipse, rotated_ellipse, circle, line, quadratic_bezier, polyline
s | Number of shapes to use in the output image | 250
c | The number of candidate shapes per shape added to the output image | 500
m | The maximum number of times to mutate each candidate shape | 100
a | The opacity (0-255) of each shape added to the output image | 128## Notes
* Got an idea or suggestion? Open an issue or send Sam a message on [Twitter](https://twitter.com/Sam_Twidale).