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.

Returns:
compas.geometry.Plane

The plane defined by the points.

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)
>>> plane.point
Point(0.000, 0.000, 0.000)
>>> plane.normal
Vector(0.000, 0.000, 1.000)