Plane.from_points
- classmethod Plane.from_points(points)[source]
Construct a plane from a list of points.
If the list contains more than three points, a plane is constructed that minimizes the distance to all points.
- Parameters:
- pointslist of [float, float, float] |
compas.geometry.Point
The points.
- pointslist of [float, float, float] |
- Returns:
compas.geometry.Plane
The plane defined by the points.
See also
Examples
>>> points = [[0.0, 0.0, 0.0], [2.0, 1.0, 0.0], [0.0, 3.0, 0.0]] >>> plane = Plane.from_points(points) >>> print(plane.point) Point(x=0.000, y=0.000, z=0.000) >>> print(plane.normal) Vector(x=0.000, y=0.000, z=1.000)