def get_t_from_plane_normal_and_position(plane_normal, plane_position, point):
    """
    Calculates the length of a vector t that goes between the surface of a
    plane and an arbitrary point, in the direction of the normal to that plane.
    In: plane normal, plane position and point, three 1-d numpy arrays with 3
    elements each.
    Out: t, a scalar.
    """
    x, y, z = point[0], point[1], point[2]
    a, b, c = plane_normal[0], plane_normal[1], plane_normal[2]
    d, e, f = plane_position[0], plane_position[1], plane_position[2]
    t = (a*d - a*x + b*e  - b*y + c*f - c*z)/(a**2 + b**2 + c**2)
    return t