def line_line_intersection(x1,y1,x2,y2,x3,y3,x4,y4):
    """
    https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
    Line 1 point 1 = (x1,y1)
    Line 1 point 2 = (x2,y2)
    Line 2 point 1 = (x3,y3)
    Line 2 point 2 = (x4,y4)
    """
    intersection_x = ((x1*y2-y1*x2)*(x3-x4)-(x1-x2)*(x3*y4-y3*x4))/((x1-x2)*(y3-y4)-(y1-y2)*(x3-x4))
    intersection_y = ((x1*y2-y1*x2)*(y3-y4)-(y1-y2)*(x3*y4-y3*x4))/((x1-x2)*(y3-y4)-(y1-y2)*(x3-x4))
    return intersection_x,intersection_y