polymerist.maths.linearalg.affine

Utilities to streamline creation of 4x4 affine transformation matrices of 3D linear transformations in homogeneous coordinates

Attributes

Array4x4

AffineMatrix

Functions

xyzTrans(→ AffineMatrix)

Returns rigid affine matrix which performs an isometric translation by "x", "y", and "z" units

xRot(→ AffineMatrix)

Returns rigid affine matrix which rotates about the positive x-axis by "angle_rad" radians

yRot(→ AffineMatrix)

Returns rigid affine matrix which rotates about the positive y-axis by "angle_rad" radians

zRot(→ AffineMatrix)

Returns rigid affine matrix which rotates about the positive z-axis by "angle_rad" radians

randRot(→ 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)

xyzScale(→ AffineMatrix)

Returns rigid affine matrix which scales basis vectors by factors of "sx", "sy", and "sz" units

Module Contents

polymerist.maths.linearalg.affine.Array4x4
polymerist.maths.linearalg.affine.AffineMatrix
polymerist.maths.linearalg.affine.xyzTrans(x: float = 0.0, y: float = 0.0, z: float = 0.0) AffineMatrix[source]

Returns rigid affine matrix which performs an isometric translation by “x”, “y”, and “z” units Returns the Identity matrix in absence of passed arguments

polymerist.maths.linearalg.affine.xRot(angle_rad: float = 0.0) AffineMatrix[source]

Returns rigid affine matrix which rotates about the positive x-axis by “angle_rad” radians Returns the Identity matrix in absence of passed arguments

polymerist.maths.linearalg.affine.yRot(angle_rad: float = 0.0) AffineMatrix[source]

Returns rigid affine matrix which rotates about the positive y-axis by “angle_rad” radians Returns the Identity matrix in absence of passed arguments

polymerist.maths.linearalg.affine.zRot(angle_rad: float = 0.0) AffineMatrix[source]

Returns rigid affine matrix which rotates about the positive z-axis by “angle_rad” radians Returns the Identity matrix in absence of passed arguments

polymerist.maths.linearalg.affine.randRot(about_x: bool = True, about_y: bool = True, about_z: bool = True) AffineMatrix[source]

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)

polymerist.maths.linearalg.affine.xyzScale(sx: float = 1.0, sy: float = 1.0, sz: float = 1.0) AffineMatrix[source]

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