Shear
- class Shear(shear_angle: float, shear_factor: float)
A
Shear
transformation shears the plane by a givenshear_factor
,f
, preserving points on the line passing through(0, 0, 0)
at a givenshear_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 theshear_factor
totan(α)
. 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 this
Shear
to a vector.The inverse
HomogeneousTransformation
of this one.- inverse()
The inverse
HomogeneousTransformation
of this one.