polymerist.maths.linearalg.affine ================================= .. py:module:: polymerist.maths.linearalg.affine .. autoapi-nested-parse:: Utilities to streamline creation of 4x4 affine transformation matrices of 3D linear transformations in homogeneous coordinates Attributes ---------- .. autoapisummary:: polymerist.maths.linearalg.affine.Array4x4 polymerist.maths.linearalg.affine.AffineMatrix Functions --------- .. autoapisummary:: polymerist.maths.linearalg.affine.xyzTrans polymerist.maths.linearalg.affine.xRot polymerist.maths.linearalg.affine.yRot polymerist.maths.linearalg.affine.zRot polymerist.maths.linearalg.affine.randRot polymerist.maths.linearalg.affine.xyzScale Module Contents --------------- .. py:data:: Array4x4 .. py:data:: AffineMatrix .. py:function:: xyzTrans(x: float = 0.0, y: float = 0.0, z: float = 0.0) -> AffineMatrix Returns rigid affine matrix which performs an isometric translation by "x", "y", and "z" units Returns the Identity matrix in absence of passed arguments .. py:function:: xRot(angle_rad: float = 0.0) -> AffineMatrix Returns rigid affine matrix which rotates about the positive x-axis by "angle_rad" radians Returns the Identity matrix in absence of passed arguments .. py:function:: yRot(angle_rad: float = 0.0) -> AffineMatrix Returns rigid affine matrix which rotates about the positive y-axis by "angle_rad" radians Returns the Identity matrix in absence of passed arguments .. py:function:: zRot(angle_rad: float = 0.0) -> AffineMatrix Returns rigid affine matrix which rotates about the positive z-axis by "angle_rad" radians Returns the Identity matrix in absence of passed arguments .. py:function:: randRot(about_x: bool = True, about_y: bool = True, about_z: bool = True) -> AffineMatrix Returns an affine matrix for a rotation by some random angle(s) about the x, y, and z axes (or any subset of those axes) .. py:function:: xyzScale(sx: float = 1.0, sy: float = 1.0, sz: float = 1.0) -> AffineMatrix Returns rigid affine matrix which scales basis vectors by factors of "sx", "sy", and "sz" units Returns the Identity matrix in absence of passed arguments