Shear

class Shear(shear_angle: float, shear_factor: float)

A Shear transformation shears the plane by a given shear_factor, f, preserving points on the line passing through (0, 0, 0) at a given shear_angle, θ.

This preserves areas but not lengths. In the future, it can be extended to shear planes other than the XY-plane.

To shear a square lattice from having a 90° angle between the lines parallel to θ and those perpendicular to a parallelogram lattice with a (90-α)° angle in its place, set the shear_factor to tan(α). This is a more familiar representation for some people.

Its matrix looks like:

┏                                                            ┓
┃  1 - f*cos(θ)sin(θ)      f*cos(θ)cos(θ)       0       0    ┃
┃    -f*sin(θ)sin(θ)    1 + f*cos(θ)sin(θ)      0       0    ┃
┃          0                    0               1       0    ┃
┃          0                    0               0       1    ┃
┗                                                            ┛

Methods

apply

Apply this Shear to a vector.

inverse

The inverse HomogeneousTransformation of this one.

apply(vector: ndarray[3]) ndarray[3]

Apply this Shear to a vector.

inverse()

The inverse HomogeneousTransformation of this one.