libTess is the gold standard for polygon tessellation. A JS port is available:https://github.com/brendankenny/libtess.js/ …
-
-
Replying to @Vector_GL @mrdoob and
No it's not.Maybe 10 years ago it was) ) Try
#mapbox earcut.1 reply 0 retweets 0 likes -
Replying to @SasMaster1980 @mrdoob and
It looks very good, but I need a constrained Delaunay triangulation solution. I also use libTess for its robust boundary contour operations for clipping and booleans.
3 replies 0 retweets 0 likes -
Replying to @Vector_GL @SasMaster1980 and
For what it’s worth, I like the libtess approach of monotone polygon decomposition a lot better than ear clipping. I just have an engineer’s bias toward simplicity, which is why I like trapezoidation :)
1 reply 0 retweets 0 likes -
Replying to @pcwalton @SasMaster1980 and
libTess is academically impeccable - but it produces a lot of tall very skinny triangles due to the horizontal sweepline.
2 replies 0 retweets 0 likes -
Replying to @Vector_GL @SasMaster1980 and
Ditto with trapezoidation. In fact I believe trapezoidation plus monotone polygon decomposition is *equivalent* to the libtess approach.
1 reply 0 retweets 0 likes -
Replying to @pcwalton @Vector_GL and
In other words: Lorenzetto trapezoidation is half of libtess. The problem I had is that monotone polygon decomposition is really hard to make work, maybe impossible, while preserving curves. So I just threw that part out. End result: A simple approach.
3 replies 0 retweets 0 likes -
Replying to @pcwalton @SasMaster1980 and
I suppose Pathfinder has to deal with a lot of skinny horizontal triangles instead ;-) At one stage I considered a post triangulation merging algorithm.
1 reply 0 retweets 0 likes -
Replying to @Vector_GL @SasMaster1980 and
Yep, it does have a lot of skinny triangles. But I’m willing to accept that drawback because it’s so simple. I want to ship and have the code be maintainable :)
2 replies 0 retweets 0 likes -
Replying to @pcwalton @SasMaster1980 and
Also, I’ve yet to find a triangulation solution that has acceptable latency. I can run my fat scanline algorithm is a few ms. Triangulation can easily take 10x longer. All those linked lists are so cache hostile.
2 replies 0 retweets 0 likes
BTW, I like the name “fat scanlines” for trapezoidation. Can I steal that name? :)
-
-
Replying to @pcwalton @SasMaster1980 and
Just let me register the trademark first ;-) Of course you can - as long as I get a mention.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.