Mine is here: http://www.pastie.org/153343 Lifted mostly from http://www.cs.mcgill.ca/~cs507/projects/1998/jacob/. Classic Convex Hull based solution that seems to scale O(n). -Doug Seifert