skspatial.objects.Cylinder.is_point_within¶
- Cylinder.is_point_within(point: Union[ndarray, Sequence]) bool [source]¶
Check if a point is within the cylinder.
This also includes a point on the surface.
- Parameters:
- pointarray_like
Input point
- Returns:
- bool
True if the point is within the cylinder.
Examples
>>> from skspatial.objects import Cylinder
>>> cylinder = Cylinder([0, 0, 0], [0, 0, 1], 1)
>>> cylinder.is_point_within([0, 0, 0]) True >>> cylinder.is_point_within([0, 0, 1]) True >>> cylinder.is_point_within([0, 0, 2]) False >>> cylinder.is_point_within([0, 0, -1]) False >>> cylinder.is_point_within([1, 0, 0]) True >>> cylinder.is_point_within([0, 1, 0]) True >>> cylinder.is_point_within([1, 1, 0]) False