skspatial.objects.Cylinder.from_points¶
- classmethod Cylinder.from_points(point_a: Union[ndarray, Sequence], point_b: Union[ndarray, Sequence], radius: float) Cylinder [source]¶
Instantiate a cylinder from two points and a radius.
- Parameters
- point_a, point_barray_like
The centres of the two circular ends.
- radiusfloat
The cylinder radius.
- Returns
- Cylinder
The cylinder defined by the two points and the radius.
Examples
>>> from skspatial.objects import Cylinder
>>> Cylinder.from_points([0, 0, 0], [0, 0, 1], 1) Cylinder(point=Point([0, 0, 0]), vector=Vector([0, 0, 1]), radius=1)
>>> Cylinder.from_points([0, 0, 0], [0, 0, 2], 1) Cylinder(point=Point([0, 0, 0]), vector=Vector([0, 0, 2]), radius=1)