matrix_from_perspective_projection

compas.geometry.matrix_from_perspective_projection(plane, center_of_projection)[source]

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

Parameters
Returns

list[list[float]] – A 4-by-4 transformation matrix.

Examples

>>> point = [0, 0, 0]
>>> normal = [0, 0, 1]
>>> plane = (point, normal)
>>> center_of_projection = [1, 1, 0]
>>> P = matrix_from_perspective_projection(plane, center_of_projection)