def contains_point() -> None: polygon = Polygon(points[0: len(points) - 1]) polygon.draw(canvas) if polygon.does_contain(points[-1]): messagebox.showinfo("Result", "Point is INSIDE polygon") else: messagebox.showinfo("Result", "Point is OUTSIDE polygon")
def is_convex() -> None: polygon = Polygon(points) polygon.draw(canvas) if polygon.is_convex(): messagebox.showinfo("Result", "Polygon IS convex") else: messagebox.showinfo("Result", "Polygon IS NOT convex")
def make_convex_hull() -> None: polygon = Polygon(points) polygon.make_convex_hull() polygon.draw(canvas)
def make_simple_polygon() -> None: polygon = Polygon(points) polygon.make_simple() polygon.draw(canvas)