Patent ID: 6870533

Claim:
A method for detecting an invalid polygon on a handheld computer device comprising: (a) inputing from a user on a graphical interface a plurality of connected lines to define a polygon; (b) selecting a pair of lines from the plurality of lines that do not share a common starting point; (c) determining if the selected pair of lines crossover; (d) determining the polygon is invalid and indicating to the invalidity to the user if the selected pair of lines crossover; and (e) repeating steps (a)-(c) for remaining pairs of lines from the set of lines, wherein the determining line crossover step comprises: determining a starting and ending point for each line in the pair of lines; determining an overlap interval; determining if the overlap interval is a valid interval; calculating a value for each line based on the overlap interval if the overlap interval is valid; comparing the values for each line if the overlap interval is valid; and detecting line crossover based on the comparison if the overlap interval is valid.