{"id":19961954,"url":"https://github.com/tw1ddle/geometrize-lib-example","last_synced_at":"2025-05-03T22:31:13.772Z","repository":{"id":46922411,"uuid":"99737758","full_name":"Tw1ddle/geometrize-lib-example","owner":"Tw1ddle","description":"Minimal example using the Geometrize library, a tool for geometrizing images","archived":false,"fork":false,"pushed_at":"2024-01-23T20:52:57.000Z","size":8902,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-01-23T22:11:43.648Z","etag":null,"topics":["art","geometrize","geometry-processing","hill-climbing"],"latest_commit_sha":null,"homepage":"https://www.geometrize.co.uk/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tw1ddle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-08T21:29:51.000Z","updated_at":"2023-08-20T00:57:06.000Z","dependencies_parsed_at":"2022-09-07T04:40:36.061Z","dependency_job_id":null,"html_url":"https://github.com/Tw1ddle/geometrize-lib-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tw1ddle%2Fgeometrize-lib-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tw1ddle%2Fgeometrize-lib-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tw1ddle%2Fgeometrize-lib-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tw1ddle%2Fgeometrize-lib-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tw1ddle","download_url":"https://codeload.github.com/Tw1ddle/geometrize-lib-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224374716,"owners_count":17300691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["art","geometrize","geometry-processing","hill-climbing"],"created_at":"2024-11-13T02:09:01.393Z","updated_at":"2024-11-13T02:09:01.958Z","avatar_url":"https://github.com/Tw1ddle.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Geometrize library example logo](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/screenshots/geometrize_lib_example_logo.png?raw=true \"Geometrize - library for geometrizing images into geometric primitives demo logo\")](https://www.geometrize.co.uk)\n\n[![License](https://img.shields.io/:license-mit-blue.svg?style=flat-square)](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/LICENSE)\n[![Build Status Badge](https://ci.appveyor.com/api/projects/status/github/Tw1ddle/geometrize-lib-example)](https://ci.appveyor.com/project/Tw1ddle/geometrize-lib-example)\n\nMinimal example of the [Geometrize library](https://github.com/Tw1ddle/geometrize-lib), the library used in the image-to-shapes conversion app [Geometrize](https://www.geometrize.co.uk).\n\n## Usage\n\nCopy the binary to the [sample images](https://github.com/Tw1ddle/geometrize-lib-example/tree/master/sample_images/) folder and start geometrizing some images via the command-line.\n\n```\n# Create an image made of 500 rotated rectangles\ngeometrize_lib_example -i monarch_butterfly.png -o monarch_butterfly_out.png -t rotated_rectangle -s 500\n```\n\n[![Geometrize Monarch Butterfly Example](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/screenshots/monarch_butterfly.png?raw=true \"Geometrize Monarch Butterfly Example\")](https://www.geometrize.co.uk)\n\n\n```\n# Create an image made of 400 circles\ngeometrize_lib_example -i sliced_fruit.png -o sliced_fruit_out.png -t circle -s 400\n```\n\n[![Geometrize Fruit Example](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/screenshots/sliced_fruit.png?raw=true \"Geometrize Fruit Example\")](https://www.geometrize.co.uk)\n\n```\n# Create an image made of 400 rotated ellipses\ngeometrize_lib_example -i pomegranate_splitting.png -o pomegranate_splitting_out.png -t rotated_ellipse -s 400\n```\n\n[![Geometrize Pomegranate Example](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/screenshots/pomegranate_splitting.png?raw=true \"Geometrize Pomegranate Example\")](https://www.geometrize.co.uk)\n\n```\n# Create an image made of 300 triangles\ngeometrize_lib_example -i grapefruit.png -o grapefruit_out.png -t triangle -s 300\n```\n\n[![Geometrize Grapefruit Example](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/screenshots/grapefruit.png?raw=true \"Geometrize Grapefruit Example\")](https://www.geometrize.co.uk)\n\n```\n# Create an image made of 300 ellipses\ngeometrize_lib_example -i hot_air_balloon.png -o hot_air_balloon_out.png -t ellipse -s 300\n```\n\n[![Geometrize Hot Air Balloon Example](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/screenshots/hot_air_balloon.png?raw=true \"Geometrize Hot Air Balloon Example\")](https://www.geometrize.co.uk)\n\n\n```\n# Create an image made of 500 rectangles\ngeometrize_lib_example -i sunrise_at_sea.png -o sunrise_at_sea_out.png -t rectangle -s 500\n```\n\n[![Geometrize Sunrise At Sea Example](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/screenshots/sunrise_at_sea.png?raw=true \"Geometrize Sunrise At Sea Example\")](https://www.geometrize.co.uk)\n\n\n```\n# Create an image made of 5000 polylines\ngeometrize_lib_example -i sundaes.png -o sundaes_out.png -t polyline -s 5000\n```\n\n[![Geometrize Sundaes Example](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/screenshots/sundaes.png?raw=true \"Geometrize Sundaes Example\")](https://www.geometrize.co.uk)\n\n```\n# Create an image made of 4000 quadratic beziers\ngeometrize_lib_example -i jammy_biscuit.png -o jammy_biscuit_out.png -t quadratic_bezier -s 4000\n```\n\n[![Geometrize Jammy Biscuit Example](https://github.com/Tw1ddle/geometrize-lib-example/blob/master/screenshots/jammy_biscuit.png?raw=true \"Geometrize Jammy Biscuit Example\")](https://www.geometrize.co.uk)\n\n```\n# Create a JSON data file defining 400 circles that make up an image\ngeometrize_lib_example -i sliced_fruit.png -o sliced_fruit_out.json -t circle -s 400\n```\n\n```\n# Create a SVG image file consisting of 400 circles \ngeometrize_lib_example -i sliced_fruit.png -o sliced_fruit_out.svg -t circle -s 400\n```\n\n```\n# Create an SVG image file consisting of 200 circles, ellipses and rotated rectangles\ngeometrize_lib_example -i sliced_fruit.png -o sliced_fruit_out.svg -t \"circle ellipse rotated_rectangle\" -s 200\n```\n\n## Options\n\nFlag            | Description    | Default    |\n--------------- | ---------------| ---------|\ni               | The filepath to load the input image from | n/a\no               | The filepath to save the output image, JSON data or SVG | n/a\nt               | The types of shapes to use | One or more of: rectangle, rotated_rectangle, triangle, ellipse, rotated_ellipse, circle, line, quadratic_bezier, polyline\ns               | Number of shapes to use in the output image | 250\nc               | The number of candidate shapes per shape added to the output image | 500\nm               | The maximum number of times to mutate each candidate shape | 100\na               | The opacity (0-255) of each shape added to the output image | 128\n\n## Notes\n * Got an idea or suggestion? Open an issue or send Sam a message on [Twitter](https://twitter.com/Sam_Twidale).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftw1ddle%2Fgeometrize-lib-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftw1ddle%2Fgeometrize-lib-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftw1ddle%2Fgeometrize-lib-example/lists"}