@staticmethod
def get_intersection(x, y):
    """
        This function take a set of two pairs of x/y coordinates, defining a
        pair of crossing lines, and returns the intersection. x = [x1, x2, x3, x4], y =
        [y1, y2, y3, y4], where [x1, y1] and [x2, y2] represent one line, and [x3, y3]
        and [x4, y4] represent the other. See
        https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection#Given_two_points_on_each_line
        """
    px = ((x[0] * y[1] - y[0] * x[1]) * (x[2] - x[3]) - (x[0] - x[1]) * (x[
        2] * y[3] - y[2] * x[3])) / ((x[0] - x[1]) * (y[2] - y[3]) - (y[0] -
        y[1]) * (x[2] - x[3]))
    py = ((x[0] * y[1] - y[0] * x[1]) * (y[2] - y[3]) - (y[0] - y[1]) * (x[
        2] * y[3] - y[2] * x[3])) / ((x[0] - x[1]) * (y[2] - y[3]) - (y[0] -
        y[1]) * (x[2] - x[3]))
    return px, py
