swift-geometrize

0.9.0

Swift package for recreating images as geometric primitives. Swift port of geometrize C++ library.
valeriyvan/swift-geometrize

What's New

The first release

2022-12-02T08:41:06Z

Features:

  • Recreate images as geometric primitives (circle, ellipse, rotated ellipse, rectangle, rotated rectangle, triangle, line, polyline, quadratic bezier, any combination of these).
  • Export geometrized images to SVG, PNG, JPG.
  • Command line utility.
  • Good test coverage.

Swift package for recreating images as geometric primitives. Swift port of geometrize C++ library.

TODO:

  • add stroke width for line, pilyline and bezier curve;
  • multithreading;
  • fix architectural fault with passing canvas size to shape factory;
  • solve dealing with randomness in tests.

Original README:

Geometrize Logo

License Build Status Badge

Geometrize is a C++ library based on primitive. It recreates images as geometric primitives.

Geometrized Trees 210 Ellipses

Features

  • Geometrize images into shapes.
  • Export the results as SVG, JSON and more.

Usage

Refer to the minimal example project and read the documentation. These projects may also be useful references:

Project
Geometrize App
Example
Fuzz Tests
Unit Tests
Documentation

See the top level repo for a listing of all the repositories included in the Geometrize project.

Shape Comparison

The matrix below shows typical results for a combination of 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

Screenshots

See the gallery.

Resources

See the Geometrize resources page.

Notes

  • Got an idea or suggestion? Open an issue on GitHub, or send Sam a message on Twitter.

Description

  • Swift Tools
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Feb 03 2023 11:29:20 GMT-0500 (GMT-05:00)