12

I quickly realized that I'm awful at drawing strange enough polygons to test all the cases in my geometric algorithms class. So instead of stupidly glaring at pseudo code, I'm writing everything in C++, and testing with a random polygon generator.
Here's my repository -
https://github.com/FullMetalNicky/...

Comments
  • 2
    Neat. Why do you pass imgPolygon to GrahamsScan? I see that the formal parameter's name is 'debug' so I guess you were checking things with it.

    How much did it take to write the whole project?
  • 3
    @Chrupiter It is for debugging indeed. I can see an image (using ImageWatch) of the polygon instead of just a list of numbers, so it is easier to understand what point I'm processing or what went wrong in some function.
    I started it 3 days ago, and worked on it 3-4 hours a day I guess.
  • 1
    You'll have fun in case you implement delaunay triangulation.
  • 1
    @Chrupiter It's in the syllabus :)
    We had plane sweep last week, I'm thinking about coding the simplified version.
  • 2
    @NickyBones I drop this in case you wanna augment the set of possible ideas:

    "A Simple Sweep-line Delaunay Triangulation Algorithm"- Yonghe

    It helped me in the past, even though I f*cked it up, couldn't find the bug and ended up implementing my own O(n^2) idea because the deadline was impending and triangulation wasn't the main topic.
Add Comment