skspatial.objects.Plane.cartesian¶
- Plane.cartesian() Tuple[int64, int64, int64, int64][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() (np.int64(1), np.int64(0), np.int64(0), np.int64(-1))
>>> Plane(point=[1, 2, 0], normal=[0, 0, 1]).cartesian() (np.int64(0), np.int64(0), np.int64(1), np.int64(0))
>>> Plane(point=[1, 2, 8], normal=[0, 0, 5]).cartesian() (np.int64(0), np.int64(0), np.int64(5), np.int64(-40))
>>> Plane(point=[4, 9, -1], normal=[10, 2, 4]).cartesian() (np.int64(10), np.int64(2), np.int64(4), np.int64(-54))
>>> Plane([0, 0, 0, 0], [1, 0, 0, 0]).cartesian() Traceback (most recent call last): ... ValueError: The plane dimension must be <= 3.