Shear mapping

Revision as of 09:09, 26 May 2025 by imported>Xland44 (→‎Etymology)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description Template:More footnotes needed

File:VerticalShear m=1.25 (blue and red).svg
Horizontal shearing of the plane, transforming the blue into the red shape. The black dot is the origin.
File:Laminar shear.svg
In fluid dynamics a shear mapping depicts fluid flow between parallel plates in relative motion.

In plane geometry, a shear mapping is an affine transformation that displaces each point in a fixed direction by an amount proportional to its signed distance from a given line parallel to that direction.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

This type of mapping is also called shear transformation, transvection, or just shearing. The transformations can be applied with a shear matrix or transvection, an elementary matrix that represents the addition of a multiple of one row or column to another. Such a matrix may be derived by taking the identity matrix and replacing one of the zero elements with a non-zero value.

An example is the linear map that takes any point with coordinates <math>(x,y)</math> to the point <math>(x + 2y,y)</math>. In this case, the displacement is horizontal by a factor of 2 where the fixed line is the Template:Mvar-axis, and the signed distance is the Template:Mvar-coordinate. Note that points on opposite sides of the reference line are displaced in opposite directions.

Shear mappings must not be confused with rotations. Applying a shear map to a set of points of the plane will change all angles between them (except straight angles), and the length of any line segment that is not parallel to the direction of displacement. Therefore, it will usually distort the shape of a geometric figure, for example turning squares into parallelograms, and circles into ellipses. However a shearing does preserve the area of geometric figures and the alignment and relative distances of collinear points. A shear mapping is the main difference between the upright and slanted (or italic) styles of letters.

The same definition is used in three-dimensional geometry, except that the distance is measured from a fixed plane. A three-dimensional shearing transformation preserves the volume of solid figures, but changes areas of plane figures (except those that are parallel to the displacement). This transformation is used to describe laminar flow of a fluid between plates, one moving in a plane above and parallel to the first.

In the general Template:Mvar-dimensional Cartesian space Template:Tmath the distance is measured from a fixed hyperplane parallel to the direction of displacement. This geometric transformation is a linear transformation of Template:Tmath that preserves the Template:Mvar-dimensional measure (hypervolume) of any set.

DefinitionEdit

Horizontal and vertical shear of the planeEdit

Template:Refimprove section

File:SVG skewX.svg
Horizontal shear of a square into parallelograms with factors <math>\cot(60^\circ) = \tan(30^\circ) \approx 0.58</math> and <math>\cot(45^\circ) = \tan(45^\circ) = 1</math>

In the plane <math>\R^2 = \R\times\R</math>, a horizontal shear (or shear parallel to the Template:Mvar-axis) is a function that takes a generic point with coordinates <math>(x,y)</math> to the point <math>(x + m y,y)</math>; where Template:Mvar is a fixed parameter, called the shear factor.

The effect of this mapping is to displace every point horizontally by an amount proportionally to its Template:Mvar-coordinate. Any point above the Template:Mvar-axis is displaced to the right (increasing Template:Mvar) if Template:Math, and to the left if Template:Math. Points below the Template:Mvar-axis move in the opposite direction, while points on the axis stay fixed.

Straight lines parallel to the Template:Mvar-axis remain where they are, while all other lines are turned (by various angles) about the point where they cross the Template:Mvar-axis. Vertical lines, in particular, become oblique lines with slope <math>\tfrac 1 m.</math> Therefore, the shear factor Template:Mvar is the cotangent of the shear angle <math>\varphi</math> between the former verticals and the Template:Mvar-axis.Template:Fact In the example on the right the square is tilted by 30°, so the shear angle is 60°.

If the coordinates of a point are written as a column vector (a 2×1 matrix), the shear mapping can be written as multiplication by a 2×2 matrix:

<math>
 \begin{pmatrix}x^\prime \\y^\prime \end{pmatrix}  =
 \begin{pmatrix}x + m y \\y \end{pmatrix} =
 \begin{pmatrix}1 & m\\0 & 1\end{pmatrix} 
   \begin{pmatrix}x \\y \end{pmatrix}.

</math>

A vertical shear (or shear parallel to the Template:Mvar-axis) of lines is similar, except that the roles of Template:Mvar and Template:Mvar are swapped. It corresponds to multiplying the coordinate vector by the transposed matrix:

<math>
 \begin{pmatrix}x^\prime \\y^\prime \end{pmatrix}  = 
 \begin{pmatrix}x \\ m x + y \end{pmatrix} = 
 \begin{pmatrix}1 & 0\\m & 1\end{pmatrix} 
   \begin{pmatrix}x \\y \end{pmatrix}.

</math>

The vertical shear displaces points to the right of the Template:Mvar-axis up or down, depending on the sign of Template:Mvar. It leaves vertical lines invariant, but tilts all other lines about the point where they meet the Template:Mvar-axis. Horizontal lines, in particular, get tilted by the shear angle <math>\varphi</math> to become lines with slope Template:Mvar.

CompositionEdit

Two or more shear transformations can be combined.

If two shear matrices are <math display="inline">\begin{pmatrix} 1 & \lambda \\ 0 & 1 \end{pmatrix}</math> and <math display="inline">\begin{pmatrix} 1 & 0 \\ \mu & 1 \end{pmatrix}</math>

then their composition matrix is <math display="block">\begin{pmatrix} 1 & \lambda \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ \mu & 1\end{pmatrix} = \begin{pmatrix} 1 + \lambda\mu & \lambda \\ \mu & 1 \end{pmatrix},</math> which also has determinant 1, so that area is preserved.

In particular, if <math>\lambda=\mu</math>, we have

<math display="block">\begin{pmatrix} 1 + \lambda^2 & \lambda \\ \lambda & 1 \end{pmatrix},</math>

which is a positive definite matrix.

Higher dimensionsEdit

A typical shear matrix is of the form <math display="block">S = \begin{pmatrix} 1 & 0 & 0 & \lambda & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{pmatrix}.</math>

This matrix shears parallel to the Template:Mvar axis in the direction of the fourth dimension of the underlying vector space.

A shear parallel to the Template:Mvar axis results in <math>x' = x + \lambda y</math> and <math>y' = y</math>. In matrix form: <math display="block">\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} 1 & \lambda \\ 0 & 1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}.</math>

Similarly, a shear parallel to the Template:Mvar axis has <math>x' = x</math> and <math>y' = y + \lambda x</math>. In matrix form: <math display="block">\begin{pmatrix}x' \\ y' \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ \lambda & 1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}.</math>

In 3D space this matrix shear the YZ plane into the diagonal plane passing through these 3 points: <math>(0, 0, 0)</math> <math>(\lambda, 1, 0)</math> <math>(\mu, 0, 1)</math> <math display="block">S = \begin{pmatrix} 1 & \lambda & \mu \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}.</math>

The determinant will always be 1, as no matter where the shear element is placed, it will be a member of a skew-diagonal that also contains zero elements (as all skew-diagonals have length at least two) hence its product will remain zero and will not contribute to the determinant. Thus every shear matrix has an inverse, and the inverse is simply a shear matrix with the shear element negated, representing a shear transformation in the opposite direction. In fact, this is part of an easily derived more general result: if Template:Mvar is a shear matrix with shear element Template:Math, then Template:Mvar is a shear matrix whose shear element is simply Template:Math. Hence, raising a shear matrix to a power Template:Mvar multiplies its shear factor by Template:Mvar.

PropertiesEdit

If Template:Mvar is an Template:Math shear matrix, then:

General shear mappingsEdit

For a vector space Template:Mvar and subspace Template:Mvar, a shear fixing Template:Mvar translates all vectors in a direction parallel to Template:Mvar.

To be more precise, if Template:Mvar is the direct sum of Template:Mvar and Template:Mvar, and we write vectors as

<math>v=w+w'</math>

correspondingly, the typical shear Template:Mvar fixing Template:Mvar is

<math>L(v) = (Lw+Lw') = (w+Mw') + w',</math>

where Template:Mvar is a linear mapping from Template:Mvar into Template:Mvar. Therefore in block matrix terms Template:Mvar can be represented as

<math>\begin{pmatrix} I & M \\ 0 & I \end{pmatrix}. </math>


ApplicationsEdit

The following applications of shear mapping were noted by William Kingdon Clifford:

"A succession of shears will enable us to reduce any figure bounded by straight lines to a triangle of equal area."
"... we may shear any triangle into a right-angled triangle, and this will not alter its area. Thus the area of any triangle is half the area of the rectangle on the same base and with height equal to the perpendicular on the base from the opposite angle."<ref>Template:Cite book</ref>

The area-preserving property of a shear mapping can be used for results involving area. For instance, the Pythagorean theorem has been illustrated with shear mapping<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> as well as the related geometric mean theorem.

Shear matrices are often used in computer graphics.<ref>Template:Harvtxt</ref><ref>Template:Cite book</ref><ref>Template:Cite book</ref>

An algorithm due to Alan W. Paeth uses a sequence of three shear mappings (horizontal, vertical, then horizontal again) to rotate a digital image by an arbitrary angle. The algorithm is very simple to implement, and very efficient, since each step processes only one column or one row of pixels at a time.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

In typography, normal text transformed by a shear mapping results in oblique type.Template:Fact

In pre-Einsteinian Galilean relativity, transformations between frames of reference are shear mappings called Galilean transformations. These are also sometimes seen when describing moving reference frames relative to a "preferred" frame, sometimes referred to as absolute time and space.Template:Fact

EtymologyEdit

The term 'shear' originates from Physics, used to describe a cutting-like deformation in which parallel layers of material 'slide past each other'. More formally, shear force refers to unaligned forces acting on one part of a body in a specific direction, and another part of the body in the opposite direction.

See alsoEdit

ReferencesEdit

Template:Sister project Template:Sister project Template:Reflist

BibliographyEdit

Template:Computer graphics Template:Matrix classes