Skip to content

A small, self-contained, liberally-licensed, high-quality polygon triangulator in C and Javascript

License

Notifications You must be signed in to change notification settings

cscheid/tessellate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A minimal, self-contained port of SGI's GLU libtess

Polygon tessellation is a major pain in the neck. Have you ever tried writing fast and robust code for it? libtess is, to my knowledge, the only GPL-compatible, liberally-licensed, high-quality polygon triangulator out there.

This repository includes a self-contained function (tessellate, in tessellate.c) that you can call to triangulate a polygon that is potentially self-intersecting, with holes, or with duplicate vertices. Simple examples of calling the tessellate function directly are located in main.c.

tessellate.js

More interestingly, this repository also includes an Emscripten-compiled module, _tessellate.js, and a Javascript-friendly wrapper, in tessellate.js. Simple examples are available under index.html. tessellate.js is AMD-friendly, and won't pollute your global namespace if it thinks it sees RequireJS.

About

A small, self-contained, liberally-licensed, high-quality polygon triangulator in C and Javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published