Projection
-
class
compas.geometry.Projection(matrix=None)[source] Bases:
compas.geometry.transformations.transformation.TransformationCreate a projection transformation.
- Parameters
matrix (4x4 matrix-like, optional) – A 4x4 matrix (or similar) representing a projection transformation.
- Raises
ValueError – If the default constructor is used, and the provided transformation matrix is not a shear matrix.
Examples
>>>Methods
__init__([matrix])Construct a transformation from a 4x4 transformation matrix.
concatenate(other)Concatenate another transformation to this transformation.
concatenated(other)Concatenate two transformations into one
Transformation.copy()Returns a copy of the transformation.
Decompose the
Transformationinto itsScale,Shear,Rotation,TranslationandProjectioncomponents.from_change_of_basis(frame_from, frame_to)Computes a change of basis transformation between two frames.
from_data(data)Creates a
Transformationfrom a data dict.from_entries(perspective_entries)Constructs a perspective transformation by the perspective entries of a matrix.
from_euler_angles(euler_angles[, static, …])Construct a transformation from a rotation represented by Euler angles.
from_frame(frame)Computes a transformation from world XY to frame.
from_frame_to_frame(frame_from, frame_to)Computes a transformation between two frames.
from_list(numbers)Creates a
Transformationfrom a list of 16 numbers.from_matrix(matrix)Creates a
Transformationfrom a 4x4 matrix-like object.from_plane(plane)Returns an orthogonal
Projectionto project onto a plane.from_plane_and_direction(plane, direction)Returns a parallel
Projectionto project onto a plane along a specific direction.from_plane_and_point(plane, center_of_projection)Returns a perspective
Projectionto project onto a plane along lines that emanate from a single point, called the center of projection.inverse()Returns the inverse transformation.
invert()Invert this transformation.
inverted()Returns the inverse transformation.
to_data()Convert a
Transformationobject to a data dict.Transpose the matrix of this transformation.
Create a transposed copy of this transformation.