Muscat.GeometricalTools.LineTools module¶
- SegmentIntersection(P0: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], P1: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], Px: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], Py: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) Tuple[ndarray][source]¶
function to compute the intersection of 2 lines if no intersection then an empty tuple is returned if the second line is colinear to the first, return the point of the second line inside the first line
- Parameters:
P0 (ArrayLike) – first point defining the first line
P1 (ArrayLike) – second point defining the first line
Px (ArrayLike) – first point defining the second line
Py (ArrayLike) – second point defining the second line
- Returns:
a tuple containing the intersection points
- Return type:
tuple[np.ndarray]