Author Topic: Anyone knows how to convert a non-convex poly to 2 or more convex ones?  (Read 3145 times)

0 Members and 1 Guest are viewing this topic.

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Thanks!

It doesn't have to be fast ;*)
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Check Ear clipping and Seidel's algorithm.
The complexity varies depending on whether you need to support holes and/or intersecting edges.
If you're using OpenGL you might want to have a look at the glu tesselation implementation, too.


« Last Edit: October 20, 2012 by hellfire »
Challenge Trophies Won:

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Thanks buddy, reading up on ear-clipping. ;*)
Challenge Trophies Won: