# skspatial.objects.Plane¶

class skspatial.objects.Plane(point: Union[numpy.ndarray, Sequence], normal: Union[numpy.ndarray, Sequence])[source]

A plane in space.

The plane is defined by a point and a normal vector.

Parameters
pointarray_like

Point on the plane.

directionarray_like

Normal vector of the plane.

kwargsdict, optional

Additional keywords passed to `Vector.is_zero()`. This method is used to ensure that the normal vector is not the zero vector.

Raises
ValueError

If the point and vector have different dimensions. If the vector is all zeros.

Examples

```>>> from skspatial.objects import Plane
```
```>>> plane = Plane(point=[0, 0, 0], normal=[0, 0, 5])
```
```>>> plane
Plane(point=Point([0, 0, 0]), normal=Vector([0, 0, 5]))
```
```>>> plane.normal
Vector([0, 0, 5])
```

The normal can also be accessed with the `vector` attribute.

```>>> plane.vector
Vector([0, 0, 5])
```

The plane dimension is the dimension of the point and vector.

```>>> plane.dimension
3
```
```>>> Plane([0, 0], [1, 0, 0])
Traceback (most recent call last):
...
ValueError: The point and vector must have the same dimension.
```
```>>> Plane([1, 1], [0, 0])
Traceback (most recent call last):
...
ValueError: The vector must not be the zero vector.
```
Attributes
pointPoint

Point on the plane.

normalVector

Unit normal vector.

vectorVector

Same as the normal.

dimensionint

Dimension of the plane.

## Methods¶

 `best_fit`(points[, tol]) Return the plane of best fit for a set of 3D points. Return the coefficients of the Cartesian equation of the plane. Return the signed distance from a point to the plane. `from_points`(point_a, point_b, point_c, **kwargs) Instantiate a plane from three points. `from_vectors`(point, vector_a, vector_b, **kwargs) Instantiate a plane from a point and two vectors. `intersect_line`(line, **kwargs) Intersect the plane with a line. `intersect_plane`(other, **kwargs) Intersect the plane with another. `plot_3d`(ax_3d[, lims_x, lims_y]) Plot a 3D plane. `project_line`(line, **kwargs) Project a line onto the plane. `project_point`(point) Project a point onto the plane. `project_vector`(vector) Project a vector onto the plane. `side_point`(point) Find the side of the plane where a point lies. `to_mesh`([lims_x, lims_y]) Return coordinate matrices for the 3D surface of the plane. `to_points`(**kwargs) Return points on the surface of the object.
{"ft_lang_label":"__label__en","ft_lang_prob":0.6778086,"math_prob":0.9835986,"size":2002,"snap":"2022-40-2023-06","text_gpt3_token_len":520,"char_repetition_ratio":0.2022022,"word_repetition_ratio":0.09552239,"special_character_ratio":0.2837163,"punctuation_ratio":0.19796954,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99703187,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-01T04:40:34Z\",\"WARC-Record-ID\":\"<urn:uuid:bb4fc30a-359c-48fd-8d5e-382aafd8200c>\",\"Content-Length\":\"44418\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:565360a0-827f-4aae-b7e5-82f22b319879>\",\"WARC-Concurrent-To\":\"<urn:uuid:5b441af0-e51f-4318-983d-a9bb877b07fa>\",\"WARC-IP-Address\":\"104.17.33.82\",\"WARC-Target-URI\":\"https://scikit-spatial.readthedocs.io/en/stable/api_reference/skspatial.objects.Plane.html\",\"WARC-Payload-Digest\":\"sha1:GAF63KHP6VI6MYWVS7QZA5ZJLR2BZAXF\",\"WARC-Block-Digest\":\"sha1:V3YLK6UEMRACKKGUERILQHJ7Z5DKQHTB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335530.56_warc_CC-MAIN-20221001035148-20221001065148-00407.warc.gz\"}"}