skspatial.objects.Plane.from_vectors

classmethod Plane.from_vectors(point: Union[numpy.ndarray, Sequence], vector_a: Union[numpy.ndarray, Sequence], vector_b: Union[numpy.ndarray, Sequence], **kwargs) skspatial.objects.plane.Plane[source]

Instantiate a plane from a point and two vectors.

The two vectors span the plane.

Parameters
pointarray_like

Point on the plane.

vector_a, vector_barray_like

Input vectors.

kwargsdict, optional

Additional keywords passed to Vector.is_parallel().

Returns
Plane

Plane containing input point and spanned by the two input vectors.

Raises
ValueError

If the vectors are parallel.

Examples

>>> from skspatial.objects import Plane
>>> Plane.from_vectors([0, 0], [1, 0], [0, 1])
Plane(point=Point([0, 0, 0]), normal=Vector([0, 0, 1]))
>>> Plane.from_vectors([0, 0], [1, 0], [2, 0])
Traceback (most recent call last):
...
ValueError: The vectors must not be parallel.