I need a fast algorithm to find the convex hull of large simple closed polygons.
The algorithm of Lee (as described in here, Section 2.1) is fine in most, but not all cases. For instance, the clockwise polygon (3,3)-(1,2)-(2,1)-(2,2)-(3,0)-(0,1)-(0,3)-(3,3) will be given the solution (3,3)-(2,1)-(0,1)-(0,3)-(3,3) -- which does not include all vertices.
The error is that (2,2) is put on the stack. I can't see how to modify Lee's algorithm to correct for this. Can you?
Of course I could instead use Melkman's algorithm, but Lee's takes advantage of my conditions, making it so much simpler and faster that I, if possible, would prefer it. Also, I am astonished that Lee's algorithm in the literature is said to be correct.