Processing math: 100%

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

Contents

Abstract object representations for points and vectors

Point Abstract object representation for a point in Rn.
Points([points]) Container class for collection of Point objects.
Vector Abstract object representation of a vector in Rn
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×3 rotation matrix Rx(θ) for a rotation about the x axis by an angle θ.
Ry(angle[, degrees]) Generate the 3×3 rotation matrix Ry(θ) for a rotation about the y axis by an angle θ.
Rz(angle[, degrees]) Generate the 3×3 rotation matrix Rz(θ) for a rotation about the z axis by an angle θ.
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×n rotation matrix.
scaling_matrix([s, v]) Return scaling matrix.
transformation_matrix([angle, axis, ...]) Generate an (n+1)×(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.