matrix_from_parallel_projection

compas.geometry.matrix_from_parallel_projection(plane, direction)[source]

Returns an parallel projection matrix to project onto a plane.

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

  • direction ([float, float, float] | Vector) – Direction of the projection.

Returns

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

Examples

>>> point = [0, 0, 0]
>>> normal = [0, 0, 1]
>>> plane = (point, normal)
>>> direction = [1, 1, 1]
>>> P = matrix_from_parallel_projection(plane, direction)