Calculates the intersection of a list of lines. If no intersection exists, will return a point that minimizes the square of the distances to the given lines.
Parameters : | v : numpy.ndarray \((N,M)\)
p : numpy.ndarray \((N,M)\)
|
---|---|
Returns : | x : numpy.ndarray \((M)\)
|
Raises : | numpy.linalg.LinAlgError :
|
Examples
>>> v = np.array([[1,0,0],
... [0,1,0]])
>>> p = np.array([[0,0,0],
... [0,-1,0]])
>>> linesIntersection(v,p)
array([ 0., 0., 0.])
>>> p = np.array([[0,0,0],[0,-1,0.1]]) # No intersection exists
>>> linesIntersection(v,p)
array([ 0. , 0. , 0.05])