skspatial.objects.Plane.to_mesh

Plane.to_mesh(lims_x: Union[ndarray, Sequence] = (-1, 1), lims_y: Union[ndarray, Sequence] = (-1, 1)) Tuple[ndarray, ndarray, ndarray][source]

Return coordinate matrices for the 3D surface of the plane.

Parameters:
lims_x, lims_y(2,) tuple

x and y limits of the plane. Tuple of form (min, max). The default is (-1, 1). The point on the plane is used as the origin.

Returns:
X, Y, Z: ndarray

Coordinate matrices.

Examples

>>> from skspatial.objects import Plane
>>> X, Y, Z = Plane([0, 0, 0], [0, 0, 1]).to_mesh()
>>> X
array([[-1,  1],
       [-1,  1]])
>>> Y
array([[-1, -1],
       [ 1,  1]])
>>> Z
array([[0., 0.],
       [0., 0.]])