poly-decomp.js - Decompose 2D polygons into convex pieces.

  •        29

Library for decomposing 2D polygons into convex regions. Then you can use the decomp global.




Related Projects

polypartition - Tiny Polygon Partitioning and Triangulation Library

  •    C++

PolyPartition is a lightweight C++ library for polygon partition and triangulation. PolyPartition implements multiple algorithms for both convex partitioning and triangulation. Different algorithms produce different quality of results (and their complexity varies accordingly). The implemented methods/algorithms with their advantages and disadvantages are outlined below. For input parameters and return values see method declarations in polypartition.h. All methods require that the input polygons are not self-intersecting, and are defined in the correct vertex order (conter-clockwise for non-holes, clockwise for holes). Polygon vertices can easily be ordered correctly by calling TPPLPoly::SetOrientation method.



A convex hull finder 2D, 3D, and higher dimensions (n-dimensional). The code has been optimized for speed, accuracy, and robustness. I am confident that it is the best option anyone needing to find the convex hull for both large and small numbers of of points (for .NET).

Simple Polygon Triangulation


A concise implementation of the 'ear clipping' (aka 'subtracting ears') algorithm to convert simple (convex or concave, no holes) polygons to a collection of triangles. These triangles can then easily be used in 3D mesh geometries. The implementation favors simplicity over per...

gjk.c - Gilbert-Johnson-Keerthi (GJK) collision detection algorithm in 200 lines of clean plain C

  •    C

This is a rough but fast implementation of GJK collision detection algorithm in plain C. Just one C file, less then 200 lines, no dependencies. It is in 2D for now, full 3D version is upcoming... This 2D-version uses Minkowski sums and builds a triangle-simplex in Minkowski space to tell if two arbitrary convex polygons are colliding. 3D-version will be roughly the same, but will build a tetrahedron-simplex inside a 3-dimensional Minkowski space. It currently only tells if there is a collision or not. C-code for distance and contact points coming soon.Fuck licenses and copyright. I made it for learning purposes, this is public knowledge and it's absolutely free for any usage.



The Clipper library primarily performs boolean clipping (intersection, union, difference and xor) on polygons in 2D space. There are no restrictions on either the number nor the type of polygon that can be clipped. They can have holes, be self-intersecting and even have coincident edges. The library also performs polygon offsetting.

p2.js - JavaScript 2D physics library

  •    Javascript

2D rigid body physics engine written in JavaScript. Includes collision detection, contacts, friction, restitution, motors, springs, advanced constraints and various shape types. These demos use the p2 Demo framework, which provides rendering and interactivity. Use mouse/touch to throw or create objects. Use the right menu (or console!) to tweak parameters. Or just check the source to see how to programmatically build the current scene using p2.

Convex.jl - A Julia package for disciplined convex programming

  •    Julia

Convex.jl is a Julia package for Disciplined Convex Programming. Convex.jl can solve linear programs, mixed-integer linear programs, and DCP-compliant convex programs using a variety of solvers, including Mosek, Gurobi, ECOS, SCS, and GLPK, through the MathProgBase interface. It also supports optimization with complex variables and coefficients. Now let's solve a least-squares problem with inequality constraints.

Pretty Poly 3D Modeller

  •    C++

The Pretty Poly 3D Modeller is a project to produce a free, powerful 3D modeller for Linux primarily, but built for cross-platform from the start. Since Pretty Poly loads and saves in many different 3D file formats, it is also a useful model format conver

ESRI Shapefile Reader

  •    DotNet

Shapefile is a .NET library that supports read only enumeration of ESRI shapefiles, including any metadata. All 2D shapes are supported: Point, MultiPoint, PolyLine and Polygon.

polylabel - A fast algorithm for finding the pole of inaccessibility of a polygon (in JavaScript and C++)

  •    C++

A fast algorithm for finding polygon pole of inaccessibility, the most distant internal point from the polygon outline (not to be confused with centroid), implemented as a JavaScript library. Useful for optimal placement of a text label on a polygon.This is an iterative grid-based algorithm, which starts by covering the polygon with big square cells and then iteratively splitting them in the order of the most promising ones, while aggressively pruning uninteresting cells.

wordcloud2.js - Tag cloud/Wordle presentation on 2D canvas or HTML

  •    Javascript

Create a tag cloud/Wordle presentation on 2D canvas or HTML. This library is a spin-off project from HTML5 Word Cloud.

earcut - The fastest and smallest JavaScript polygon triangulation library for your WebGL apps

  •    Javascript

The fastest and smallest JavaScript polygon triangulation library. 2.5KB gzipped.The library implements a modified ear slicing algorithm, optimized by z-order curve hashing and extended to handle holes, twisted polygons, degeneracies and self-intersections in a way that doesn't guarantee correctness of triangulation, but attempts to always produce acceptable results for practical data.

point-in-polygon - determine if a point is inside a polygon

  •    Javascript

Determine if a point is inside of a polygon.This module casts a ray from the inquiry point and counts intersections, based on this algorithm.

geojson-google-maps - A simple utility to convert GeoJSON objects to Google Maps vector objects (Marker, Polyline, Polygon)

  •    Javascript

Google Maps now has proper support for GeoJSON, so you should probably use that instead. GeoJSON is used to create Google Maps API v3 vectors (Marker, Polyline, Polygon) from GeoJSON objects (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, Feature, GeometryCollection, FeatureCollection). Specifically, I'm translating some GeoJSON types to arrays of Google Maps vectors as there aren't really Google Maps equivalents of MultiPoint, MultiLineString, etc.

MaterialShadows - A library for supporting convex material shadows

  •    Java

React Native You may now use this library with react-native via the module here, built by Pranav Raj Singh Chauhan. The MaterialShadowViewWrapper is an extension of Relative Layout. The MaterialShadowFrameLayoutWrapper is an extension of FrameLayout. Use any one of them as per your convenience.

cutadapt - cutadapt removes adapter sequences from sequencing reads

  •    Python

Cutadapt finds and removes adapter sequences, primers, poly-A tails and other types of unwanted sequence from your high-throughput sequencing reads. Cleaning your data in this way is often required: Reads from small-RNA sequencing contain the 3’ sequencing adapter because the read is longer than the molecule that is sequenced. Amplicon reads start with a primer sequence. Poly-A tails are useful for pulling out RNA from your sample, but often you don’t want them to be in your reads.

tilt-brush-toolkit - Scripts and assets that help you use Tilt Brush data in your creative projects.

  •    CSharp

The Tilt Brush Toolkit is a collection of scripts and assets that allow you to use Tilt Brush data in your creative projects. If you simply want to import Tilt Brush geometry into Unity, this package is mostly superseded by Poly Toolkit. Scripts, shaders and tools for importing and manipulating Tilt Brush .fbx exports in Unity. Unless you specifically need to use .fbx -- for instance, because Maya is part of your workflow -- try Poly Toolkit first.

simplify-js - Simplify.js is a high-performance JavaScript 2D/3D polyline simplification library

  •    Javascript

Simplify.js is a high-performance JavaScript 2D/3D polyline simplification library

cocos2d-javascript - An HTML5 / JavaScript port of the Cocos2D graphics engine

  •    Javascript

This is no longer supported. You probably want https://github.com/cocos2d/cocos2d-js instead. Cocos2D JavaScript is an HTML5 port of Cocos2D for iPhone. It is a 2D graphics engine which allows rapid development of 2D games and graphical applications which can run in any modern Web browser without the need for third-party plug-ins such as Adobe Flash.