• entries
    743
  • comments
    1924
  • views
    580049


1 Comment


Recommended Comments

I developed a little polygon-based map editor, where you'd insert vertices then connect the dots with the mouse.

As you dragged vertices around it would find all of the other vertices in your current polygon (by following your hand-drawn links). It would remove the links between then, then reorder the list of vertices into a convex polygon (if I remember correctly, I simply went around in a clockwise direction using the midpoint of the polygon as a reference point). Once this was done, I'd join them all back together.

This could look a bit odd if you, say, grabbed a corner of a square and dragged this through the polygon, as the shape would suddenly changed once it became concave.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now