COMP 507 FALL 2003
THE UNIMODAL DISTANCE FUNCTION IN COMPUTATIONAL GEOMETRY
About the Applet:
The applet performs both real time and post input testing.
It tells you whether a polygon is convex or not, and whether or not it's unimodal with respect to vertex – vertex distance.
A blank screen is a unimodal polygon (somewhat vacuously, aka I can't really find the error).
When you perform post input testing, it tells you the direction of convexity, and which points are unimodal and which points are not unimodal.
Sometimes the colouring of the lines is incorrect for the non-convex adjacent edges, but the categorisation is always correct.
Sometimes the categorisation looks like it may be incorrect (especially when it's really close to being either convex or non-convex), but the categorisation is correct if one accounts for loss of precision in the coordinate and distance manipulations.
It gets slower when you're performing real time testing the more points you enter because of the unimodality function, which takes O(n²) time.