autopew.transform.affine¶
Submodule for calculating affine transforms between planar coordinate systems.
autopew.transform.affine.
affine_from_AB
(X, Y)[source]¶Create an affine transforamtion matrix based on two sets of coordinates.
Note
- This is an augmented matrix, and includes the translation component
autopew.transform.affine.
affine_transform
(A)[source]¶Create an affine transform function based on affine matrix A.
autopew.transform.affine.
compose_affine2d
(T=array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]), Z=array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]), R=array([[ 1., 0., 0.], [-0., 1., 0.], [ 0., 0., 1.]]))[source]¶Compose an affine transformation matrix based on translation, zoom and rotation components.
Parameters: T, Z, R ( numpy.ndarray
) – Component affine transfrom matricies for translation, zoom/scaling and rotation.Returns: A Return type: numpy.ndarray
autopew.transform.affine.
decompose_affine2d
(A)[source]¶Decompose an affine transform into components using a polar transform.
Returns: T, Z, R Return type: numpy.ndarray
Note
This decomposes the transform into the sequence rotation - zoom - translation.
To recompose this transform,