Core data structures for math (sknano.core.math)

Contents

Abstract object representations for points and vectors

Point Abstract object representation for a point in \(R^n\).
Points([points]) Container class for collection of Point objects.
Vector Abstract object representation of a vector in \(R^n\)
Vectors([vectors]) Container class for collection of Vector objects.

Linear algebra transforms

rotate(obj[, angle, axis, anchor_point, ...]) Rotate object.
Rx(angle[, degrees]) Generate the \(3\times3\) rotation matrix \(R_x(\theta)\) for a rotation about the \(x\) axis by an angle \(\theta\).
Ry(angle[, degrees]) Generate the \(3\times3\) rotation matrix \(R_y(\theta)\) for a rotation about the \(y\) axis by an angle \(\theta\).
Rz(angle[, degrees]) Generate the \(3\times3\) rotation matrix \(R_z(\theta)\) for a rotation about the \(z\) axis by an angle \(\theta\).
reflection_matrix(v) Generate reflection matrix that represents reflection of points in a mirror plane defined by normal Vector v.
rotation_matrix([angle, axis, anchor_point, ...]) Generate an \(n\times n\) rotation matrix.
scaling_matrix([s, v]) Return scaling matrix.
transformation_matrix([angle, axis, ...]) Generate an \((n+1)\times(n+1)\) transformation matrix for an affine transformation in \(n\) dimensions.
axis_angle_from_rotation_matrix(rmatrix) Compute the rotation axis and angle from a rotation matrix.

Number theory

totient_func([n]) Compute the totatives of \(n\).