none
ConvexHull RRS feed

  • Question

  • hi there!
     
    i've coded the "gift wrapping" algorythm.

    here you can see an image about how it works:
    http://upload.wikimedia.org/wikipedia/commons/d/de/Jarvis_march_convex_hull_algorithm_diagram.svg


    [EDIT]
    I UPDATED THE CODE! AND IT WORKS NOW! BUT:

    is there a better solution than what i did? mines pretty crappy if you ask me...

    IMPORT: JLF493
    Live for nothing, OR CODE FOR SOMETHING!
    Saturday, February 6, 2010 1:52 PM

Answers

  • Looks good to me - a couple of mods, Import JLF493-0.

    1] Use the Added flag to not recheck points it they are part of the convex shape already found
    2] Add an exit from the loop when the full shape perimeter is found

    • Marked as answer by Dudeson Sunday, February 7, 2010 12:36 AM
    Saturday, February 6, 2010 9:42 PM
    Moderator

All replies

  • Looks good to me - a couple of mods, Import JLF493-0.

    1] Use the Added flag to not recheck points it they are part of the convex shape already found
    2] Add an exit from the loop when the full shape perimeter is found

    • Marked as answer by Dudeson Sunday, February 7, 2010 12:36 AM
    Saturday, February 6, 2010 9:42 PM
    Moderator
  • Looks good to me - a couple of mods, Import JLF493-0.

    1] Use the Added flag to not recheck points it they are part of the convex shape already found
    2] Add an exit from the loop when the full shape perimeter is found

    wow! thank you!

    really nice what you did there! i totally didnt think of number 1!

    i hoped the whole time that you'll come to save me! and you did! XDD

    Live for nothing, OR CODE FOR SOMETHING!
    Sunday, February 7, 2010 12:36 AM