Concave Polygon Decomposition in Flash

I made a little JSFL app that made an extra tool in Flash that you could use for drawing polygons into a component a friend of mine made. It was originally written for Glaze, but we just ported it to Box2D.

I'm going to try and port the earClipping code to that, and then I'll post it here. Thanks heaps for the links. I was originally trying to port Minimum Convex Decomposition, but failed miserably! (http://www.cs.ubc.ca/spider/snoeyink/de ... DDemo.html).
Sounds good tarwin. Any plans to release the jsfl?
I just posted a blog with an example and source for the concave -> convex ear clipping thing, converted from the wonderful source code on these posts to AS3.

Enjoy

Blog post here -------------> http://blog.touchmypixel.com/archives/17
That's great, thanks tarwin. Nice blog too - I've added it to my RSS feed.
artificialgames wrote:
BungaDunga wrote:
artificialgames wrote:
Hey guys sorry to post resurrect but i have converted b2Polygon and b2Triangle from the C++ code supplied by ewjordan (http://www.box2d.org/forum/viewtopic.php?f=4&t=83&st=0&sk=t&sd=a&start=40) for AS3 (Box2D 1.4) and to my knowledge it works fine.

Sweet, I'll totally use that. I'll see if I can make the jsfl script mayobutter posted use it. Or possibly just redo it so it outputs the vertices and then they can be dropped into your b2Polygon class. It decomposes into triangles (not convex polys) right? In that case it'll be doubly useful, I can use it to build a flat 3D mesh.


No i believe it decomposes into polys not just triangles, as you can tell from my above SS.


Okay, cool, I just found a 3D triangle decomposition/extrusion class, I'll use that for the graphics side.

I've attached my version of Shape.jsfl, it just outputs the vertices of a selected path as two arrays suitable for putting into artificialgames's class.
Excellent Work!
Is there a version of artificialgames's b2Triangle and b2Polygon that works with Box2DFlashAS3 2.0.1?
Hi guys, i know this post is old now but i thought i would post resurrect and show you the outcome of this polygon decomposition in my game Icy Slicy:

Image

Link: http://www.newgrounds.com/portal/view/453498

Original thread: https://box2d.org/forum/viewtopic.php?t=463