def intersect_ray_plane(o,w,p,n):
    """[Compute the intersection point between a ray and a plane]

    Args:
        o ([ndarray]): [ray origin]
        w ([ndarray]): [ray direction]
        p ([ndarray]): [plane origin]
        n ([ndarray]): [plane normal vector]
    Returns:
        [ndarray]: [intersection point, distance to ray origin]
    """
    #derived from <n,p - (o+wt)>=0
    t = ((n * p).sum(-1,keepdim=True) - (n * o).sum(-1,keepdim=True)) / ((n * w).sum(-1,keepdim=True) +1e-5)
    return o + w * t, t