def scale_abcline(input_line, orig_dims, new_dims):
    """
    :param input_line: line of form [a, b, c] from equation of form ax+by+c=0
    :param orig_dims: tuple of (width, height) of original dimensions
    :param new_dims: tuple of (width, height) of new dimensions
    :return: scaled line of form [a', b', c'] from equation of form a'x+b'y+c'=0
    """
    # rescaling the horizon line according to the new size of the image
    # see https://math.stackexchange.com/questions/2864486/
    # how-does-equation-of-a-line-change-as-scale-of-axes-changes?noredirect=1#comment5910386_2864489
    horizon_vectorform = input_line.copy()
    net_width, net_height = orig_dims
    re_width, re_height = new_dims

    horizon_vectorform[0] = horizon_vectorform[0] / (re_width / net_width)
    horizon_vectorform[1] = horizon_vectorform[1] / (re_height / net_height)
    horizon_vectorform = horizon_vectorform / horizon_vectorform[2]

    return horizon_vectorform