Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Render arbitrary polygon with XNA

Looking for a simple way to render a list of arbitrary vertices (on a 2d plane) ... I'm guessing that I'll have to do some sort of tessellation, and will have to deal with concave/convex polygons. Not looking for a crazy visualization here ... just want to render a flat shape.

Surely others have encountered this need before? any tips would be appreciated :-)

like image 397
Joel Martinez Avatar asked Aug 17 '26 01:08

Joel Martinez


1 Answers

You're actually after triangulation.

Try Nick Gravelyn's Triangulator library. Last time I used it there was a bug in that some polygons would triangulate inside-out. But if you poke around the bug tracker I think there's a fix there (perhaps this one).

like image 110
Andrew Russell Avatar answered Aug 21 '26 19:08

Andrew Russell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!