All Projects → Tw1ddle → Geometrize Haxe

Tw1ddle / Geometrize Haxe

Licence: other
📐 Geometrize is a Haxe port of primitive that geometrizes images into geometric primitives

Programming Languages

haxe
709 projects

Projects that are alternatives of or similar to Geometrize Haxe

Geometrize Haxe Web
🌐 Web demo using the Geometrize Haxe library to recreate images with geometric primitives
Stars: ✭ 122 (-57.34%)
Mutual labels:  geometry-processing, art
Geometrize
🔳 Geometrize is a desktop app that geometrizes images into geometric primitives
Stars: ✭ 802 (+180.42%)
Mutual labels:  geometry-processing, art
PGS
Processing Geometry Suite
Stars: ✭ 39 (-86.36%)
Mutual labels:  geometry-processing
Dgtal
Digital Geometry Tools and Algorithm Library
Stars: ✭ 259 (-9.44%)
Mutual labels:  geometry-processing
FuncMorph
Crazy figures and animations with Haskell
Stars: ✭ 30 (-89.51%)
Mutual labels:  art
MovieBarCodeGenerator
User friendly tool to create your own movie barcodes
Stars: ✭ 57 (-80.07%)
Mutual labels:  art
awesome-creative-tech-events
A curated list of awesome creative tech events from around the world
Stars: ✭ 93 (-67.48%)
Mutual labels:  art
frameV
Framed Visuals: collaborative generative art.
Stars: ✭ 20 (-93.01%)
Mutual labels:  art
Epic
Dynamic java method AOP hook for Android(continution of Dexposed on ART), Supporting 5.0~11
Stars: ✭ 3,434 (+1100.7%)
Mutual labels:  art
pixel-canvas
A crate to make drawing in a buffer of pixels easy!
Stars: ✭ 19 (-93.36%)
Mutual labels:  art
3d Quickhull
Header only 3d quickhull in c99
Stars: ✭ 259 (-9.44%)
Mutual labels:  geometry-processing
fishdraw
procedurally generated fish drawings
Stars: ✭ 1,963 (+586.36%)
Mutual labels:  art
sisyphus
Lists of random resources
Stars: ✭ 24 (-91.61%)
Mutual labels:  art
3D-Engine-OpenGL-4
3D Graphics Engine For Games | C++ OpenGL 4.1
Stars: ✭ 19 (-93.36%)
Mutual labels:  geometry-processing
devBanner
Create your own devRant banner
Stars: ✭ 45 (-84.27%)
Mutual labels:  art
Theme Ad
🔨 Art design theme for write and show.
Stars: ✭ 262 (-8.39%)
Mutual labels:  art
SdfFontDesigner
Offline font tuning/bitmap generation via shaders
Stars: ✭ 56 (-80.42%)
Mutual labels:  art
glitch-image
🖼 Generate and save unique glitchy images
Stars: ✭ 46 (-83.92%)
Mutual labels:  art
hasciicam
(h)ascii for the masses! html refreshed ascii video cam
Stars: ✭ 63 (-77.97%)
Mutual labels:  art
Isolate
Lightweight image browser
Stars: ✭ 284 (-0.7%)
Mutual labels:  art

Project logo

Haxelib Version Travis Unit Test Build Status License

Geometrize Haxe is a Haxe library for recreating images with geometric primitives. Run the demo in your browser.

Geometrize Haxe is part of Geometrize, and is based on the primitive Go library.

Geometrized Cat 500 Triangles

Features

  • Recreate images as geometric primitives - rectangles, rotated rectangles, triangles, circles, ellipses, rotated ellipses and lines are supported.
  • Export generated shape data to JSON.
  • Export geometrized images as SVGs.
  • All Haxe targets are supported.

Shape Comparison

The matrix shows typical results for circles, triangles, rotated rectangles, rotated ellipses and all supported shapes at 50, 200 and 500 total shapes:

- 50 Shapes 200 Shapes 500 Shapes
Circles 50 Circles 200 Circles 500 Circles
Triangles 50 Triangles 200 Triangles 500 Triangles
Rotated Rectangles 50 Rotated Rectangles 200 Rotated Rectangles 500 Rotated Rectangles
Rotated Ellipses 50 Rotated Ellipses 200 Rotated Ellipses 500 Rotated Ellipses
All Shapes 50 All Shapes 200 All Shapes 500 All Shapes

How It Works

A user provides a target image, and the algorithm finds shapes to approximate that image. To identify a good shape, the algorithm generates a large number of random candidate shapes, repeatedly improving the fit of each using a hillclimbing optimization approach, eventually choosing the best-fitting shape. The shapes are added one by one.

JavaScript Usage

If you are working in JavaScript, check out geometrizejs which provides JavaScript API and types for this library, tested on browser and Node.js.

On top of it, geometrizejs-cli tool provides command line interface and support for common image formats.

Haxe Install

Get the Haxe library from GitHub or through haxelib:

haxelib install geometrize-haxe

Haxe Usage

  • Instantiate an ImageRunner, passing it a Bitmap target image and a starting background Rgba color.
  • Generate shapes by repeatedly calling runner.step(options), passing in your ImageRunnerOptions.
  • Export the results using the export methods on SvgExporter and ShapeJsonExporter.

Refer to the library documentation. Also see the Geometrize Haxe web demo and code, or this HaxeFlixel example and code.

Resources

Examples And Screenshots

Geometrized public domain artwork and photos:

Geometrized Flower 330 Rotated Ellipses Geometrized Train 230 Rotated Ellipses Geometrized Woodland Cemetery 600 Rotated Rectangles Geometrized Pomegranate 300 Rotated Ellipses Geometrized Monarch Butterfly 800 Various Shapes Geometrized Leafy Railroad 800 Rotated Rectangles Geometrized Pyramid 150 Triangles Geometrized Trees 210 Ellipses Geometrized Chomsky 300 Triangles Geometrized Trees 250 Rotated Ellipses Geometrized Fairies 500 Triangles

For more examples, see the Geometrize gallery.

Notes

  • This implementation is single-threaded, and performance varies by target platform. Small target images work best.
  • Got an idea or suggestion? Open an issue on GitHub, or send Sam a message on Twitter.
  • Find more related projects and open source code here.
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].