skspatial.objects.Plane.cartesian¶
- Plane.cartesian() Tuple[number, number, number, number] [source]¶
Return the coefficients of the Cartesian equation of the plane.
The equation has the form ax + by + cz + d = 0.
- Returns:
- tuple
Coefficients a, b, c, d.
- Raises:
- ValueError
If the plane dimension is higher than 3.
Examples
>>> from skspatial.objects import Plane
>>> Plane(point=[1, 1], normal=[1, 0]).cartesian() (1, 0, 0, -1)
>>> Plane(point=[1, 2, 0], normal=[0, 0, 1]).cartesian() (0, 0, 1, 0)
>>> Plane(point=[1, 2, 8], normal=[0, 0, 5]).cartesian() (0, 0, 5, -40)
>>> Plane(point=[4, 9, -1], normal=[10, 2, 4]).cartesian() (10, 2, 4, -54)
>>> Plane([0, 0, 0, 0], [1, 0, 0, 0]).cartesian() Traceback (most recent call last): ... ValueError: The plane dimension must be <= 3.