@staticmethod
def orientation(p, q, r):
    """Determine the clockwise, linear, or counterclockwise orientation of the given points"""
    val = (q[1] - p[1]) * (r[0] - q[0]) - (q[0] - p[0]) * (r[1] - q[1])
    if val == 0:
        return 0
    elif val > 0:
        return 1
    else:
        return 2
