Convex hull 2D - python

Made some convex hull algorithm implementations for my masters in computer graphics. Algorithms were implemented using Python and visualized with PyGame.

After learning and manually executing the algorithms in the whiteboard during class, I followed Wikipedia's pseudocode to write my Python implementation.

Created a simple game loop to render the current progress of the algorithm, but the algorithm was running too fast to see anything. So I had to execute the algorithms in a separate thread and expose its state to the main thread. After I got that working, I just made the algorithm thread sleep for a while after every new finding, and that made the trick.

Here's how they look!

Implemented algorithms:

  • Gift wrap
  • Graham scan
  • Quickhull
Fun Sunday afternoon with some cool nerd stuff :D

Comments

Popular posts from this blog

Semantic versioned Unity package template

My beginnings!