ands / sproutline

A small single-file library for sprite outline extraction and simplification for C/C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sprite convex hull?

bkaradzic opened this issue · comments

Is it possible to add constraint that extracted outline is convex hull with specific number of vertices and smallest area coverage?

I'm looking specifically to use this library for particle trimming like described here:
http://www.humus.name/index.php?ID=266
http://www.humus.name/index.php?page=Cool&ID=8

commented

The original purpose for this lib was to extract silhouette edges from pixel graphics to do stencil-shadow-like 2D shadow projections.
You could postprocess the polygon to create a convex hull, but there is no logic to limit the number of vertices to a specific value or to take the area coverage into account.

What is wrong with the solution made by humus?
Is there a reason you are looking for a different approach?

Not looking for different approach, rather to use one library for both. :)

commented

Fair enough :)