Projection.from_plane_and_point

classmethod Projection.from_plane_and_point(plane, center_of_projection)

Construct a perspective projection transformation to project onto a plane along lines that emanate from a single point, called the center of projection.

Parameters
  • plane ([point, normal] | Plane) – The plane to project onto.

  • center_of_projection ([float, float, float] | Point) – The camera view point.

Returns

Projection – A perspective projection transformation.

Examples

>>> from compas.geometry import Plane
>>> point = [0, 0, 0]
>>> normal = [0, 0, 1]
>>> plane = Plane(point, normal)
>>> center_of_projection = [1, 1, 0]
>>> P = Projection.from_plane_and_point(plane, center_of_projection)