Shear mapping: Difference between revisions
m →Applications: linking Paeth's algorithm to the relevant subsection on decomposing rotation matrices into shears (for completeness, and because I keep going to this page first instead of that one) |
|||
(38 intermediate revisions by 25 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Type of geometric transformation}} |
|||
[[Image:VerticalShear m=1.25.svg|thumb|175px|right|alt=Mesh Shear 5/4|A horizontal shearing of the plane with coefficient ''m'' = 1.25, illustrated by its effect (in green) on a rectangular grid and some figures (in blue). The black dot is the origin.]] |
|||
[[File:VerticalShear m=1.25 (blue and red).svg|thumb|250px|right|alt=Mesh Shear 5/4|Horizontal shearing of the plane, transforming the blue into the red shape. The black dot is the origin.]] |
|||
In [[plane geometry]], a '''shear mapping''' is a [[linear map]] that displaces each point in fixed direction, by an amount proportional to its [[signed distance function|signed distance]] from a [[straight line|line]] that is [[parallel (geometry)|parallel]] to that direction.<ref>Definition according to Weisstein, Eric W. [http://mathworld.wolfram.com/Shear.html Shear] From MathWorld − A Wolfram Web Resource</ref> This type of mapping is also called '''shear transformation''', '''transvection''', or just '''shearing'''. |
|||
[[File:Laminar_shear.svg|thumb|250px|right|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 function|signed distance]] from a given [[straight line|line]] [[parallel (geometry)|parallel]] to that direction.<ref>Definition according to Weisstein, Eric W. [http://mathworld.wolfram.com/Shear.html Shear] From MathWorld − A Wolfram Web Resource</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 [[Elementary row operations#Row-addition transformations|addition]] of a multiple of one row or column to another. Such a [[matrix (mathematics)|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 mapping that takes any point with [[Cartesian coordinates|coordinates]] <math>(x,y)</math> to the point <math>(x + 2y,y)</math>. In this case, the displacement is horizontal, the fixed line is the <math>x</math>-axis, and the signed distance is the <math>y</math> coordinate. Note that points on opposite sides of the reference line are displaced in opposite directions. |
|||
Shear mappings must not be confused with [[rotation (geometry)|rotation]]s. Applying a shear map to a set of points of the plane will change all [[angle]]s between them (except [[straight angle]]s), 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 |
An example is the [[linear map]] that takes any point with [[Cartesian coordinates|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 {{mvar|x}}-axis, and the signed distance is the {{mvar|y}}-coordinate. Note that points on opposite sides of the reference line are displaced in opposite directions. |
||
Shear mappings must not be confused with [[rotation (geometry)|rotation]]s. Applying a shear map to a set of points of the plane will change all [[angle]]s between them (except [[straight angle]]s), 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 [[parallelogram]]s, and [[circle]]s into [[ellipse]]s. 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 [[italic font|slanted (or italic)]] styles of [[Latin alphabet|letter]]s. |
|||
[[File:Laminar_shear.svg|thumb|200px|right|In [[fluid dynamics]] a shear mapping depicts fluid flow between parallel plates in relative motion.]] |
|||
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). |
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. |
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 |
In the general {{mvar|n}}-dimensional [[Cartesian geometry|Cartesian space]] {{tmath|\R^n,}} the distance is measured from a fixed [[hyperplane]] parallel to the direction of displacement. This geometric transformation is a [[linear transformation]] of {{tmath|\R^n}} that preserves the {{mvar|n}}-dimensional [[measure (mathematics)|measure]] (hypervolume) of any set. |
||
==Definition== |
==Definition== |
||
===Horizontal and vertical shear of the plane=== |
===Horizontal and vertical shear of the plane=== |
||
[[File:SVG skewX.svg|thumb|250px|Horizontal shear of a square into parallelograms with factors <math>\cot(60^\circ) \approx 0.58</math> and <math>\cot(45^\circ) = 1</math>]] |
|||
[[File:Academ Study about a periodic tiling by regular polygons.svg|thumb|upright=1.5|Through a '''shear mapping''' coded '''[[Scalable Vector Graphics|in SVG]]''',<br/>a [[rectangle]] becomes a [[parallelogram]].]] |
|||
In the plane <math>\ |
In the plane <math>\R^2 = \R\times\R</math>, a '''horizontal shear''' (or '''shear parallel''' to the {{mvar|x}}-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 {{mvar|m}} 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 |
The effect of this mapping is to displace every point horizontally by an amount proportionally to its {{mvar|y}}-coordinate. Any point above the {{mvar|x}}-axis is displaced to the right (increasing {{mvar|x}}) if {{math|''m'' > 0}}, and to the left if {{math|''m'' < 0}}. Points below the {{mvar|x}}-axis move in the opposite direction, while points on the axis stay fixed. |
||
Straight lines parallel to the |
Straight lines parallel to the {{mvar|x}}-axis remain where they are, while all other lines are turned (by various angles) about the point where they cross the {{mvar|x}}-axis. Vertical lines, in particular, become [[Angle#Types of angles|oblique]] lines with [[slope]] <math>\tfrac 1 m.</math> Therefore, the shear factor {{mvar|m}} is the [[cotangent]] of the '''shear angle''' <math>\varphi</math> between the former verticals and the {{mvar|x}}-axis. (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 (mathematics)|matrix]]), the shear mapping can be written as [[matrix product|multiplication]] by a |
If the coordinates of a point are written as a [[column vector]] (a 2×1 [[matrix (mathematics)|matrix]]), the shear mapping can be written as [[matrix product|multiplication]] by a 2×2 matrix: |
||
: <math> |
: <math> |
||
\begin{pmatrix}x^\prime \\y^\prime \end{pmatrix} = |
\begin{pmatrix}x^\prime \\y^\prime \end{pmatrix} = |
||
Line 30: | Line 32: | ||
</math> |
</math> |
||
A '''vertical shear''' (or shear parallel to the |
A '''vertical shear''' (or shear parallel to the {{mvar|y}}-axis) of lines is similar, except that the roles of {{mvar|x}} and {{mvar|y}} are swapped. It corresponds to multiplying the coordinate vector by the [[transpose of a matrix|transposed matrix]]: |
||
:<math> |
:<math> |
||
Line 39: | Line 41: | ||
</math> |
</math> |
||
The vertical shear displaces points to the right of the |
The vertical shear displaces points to the right of the {{mvar|y}}-axis up or down, depending on the sign of {{mvar|m}}. It leaves vertical lines invariant, but tilts all other lines about the point where they meet the {{mvar|y}}-axis. Horizontal lines, in particular, get tilted by the shear angle <math>\varphi</math> to become lines with slope {{mvar|m}}. |
||
=== |
====Composition==== |
||
Two or more shear transformations can be combined. |
|||
For a [[vector space]] ''V'' and subspace ''W'', a shear fixing ''W'' translates all vectors parallel to ''W''. |
|||
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> |
|||
To be more precise, if ''V'' is the [[direct sum of vector spaces|direct sum]] of ''W'' and ''W′'', and we write vectors as |
|||
then their composition matrix is |
|||
:''v'' = ''w'' + ''w′'' |
|||
<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 |
|||
correspondingly, the typical shear fixing ''W'' is ''L'' where |
|||
<math display="block">\begin{pmatrix} 1 + \lambda^2 & \lambda \\ \lambda & 1 \end{pmatrix},</math> |
|||
:''L''(''v'') = (''w'' + ''Mw′'') + ''w ′'' |
|||
which is a [[positive definite matrix]]. |
|||
where ''M'' is a linear mapping from ''W′'' into ''W''. Therefore in [[block matrix]] terms ''L'' can be represented as |
|||
===Higher dimensions=== |
|||
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 {{mvar|x}} axis in the direction of the fourth dimension of the underlying vector space. |
|||
A shear parallel to the {{mvar|x}} 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 {{mvar|y}} 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 matrix|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 {{mvar|S}} is a shear matrix with shear element {{math|λ}}, then {{mvar|S<sup>n</sup>}} is a shear matrix whose shear element is simply {{math|''n''λ}}. Hence, raising a shear matrix to a power {{mvar|n}} multiplies its [[shear mapping#Definition|shear factor]] by {{mvar|n}}. |
|||
====Properties==== |
|||
If {{mvar|S}} is an {{math|''n'' × ''n''}} shear matrix, then: |
|||
* {{mvar|S}} has [[rank of a matrix|rank]] {{mvar|n}} and therefore is [[invertible matrix|invertible]] |
|||
* 1 is the only [[eigenvalue]] of {{mvar|S}}, so {{math|1=[[determinant|det]] ''S'' = 1}} and {{math|1=[[Trace (linear algebra)|tr]] ''S'' = ''n''}} |
|||
* the [[eigenspace]] of {{mvar|S}} (associated with the eigenvalue 1) has {{math|''n'' − 1}} dimensions. |
|||
* {{mvar|S}} is [[Defective matrix|defective]] |
|||
* {{mvar|S}} is asymmetric |
|||
* {{mvar|S}} may be made into a [[block matrix]] by at most 1 column interchange and 1 row interchange operation |
|||
* the [[area (geometry)|area]], [[volume (geometry)|volume]], or any higher order interior capacity of a [[polytope]] is invariant under the shear transformation of the polytope's vertices. |
|||
===General shear mappings=== |
|||
For a [[vector space]] {{mvar|V}} and [[Linear subspace|subspace]] {{mvar|W}}, a shear fixing {{mvar|W}} translates all vectors in a direction parallel to {{mvar|W}}. |
|||
To be more precise, if {{mvar|V}} is the [[direct sum of vector spaces|direct sum]] of {{mvar|W}} and {{mvar|W′}}, and we write vectors as |
|||
:<math>v=w+w'</math> |
|||
correspondingly, the typical shear {{mvar|L}} fixing {{mvar|W}} is |
|||
:<math>L(v) = (Lw+Lw') = (w+Mw') + w',</math> |
|||
where {{mvar|M}} is a linear mapping from {{mvar|W′}} into {{mvar|W}}. Therefore in [[block matrix]] terms {{mvar|L}} can be represented as |
|||
:<math>\begin{pmatrix} I & M \\ 0 & I \end{pmatrix}. </math> |
|||
:<math>\begin{pmatrix} I & M \\ 0 & I \end{pmatrix} </math> |
|||
==Applications== |
==Applications== |
||
Line 61: | Line 124: | ||
:"... 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>[[William Kingdon Clifford]] (1885) ''Common Sense and the Exact Sciences'', page 113</ref> |
:"... 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>[[William Kingdon Clifford]] (1885) ''Common Sense and the Exact Sciences'', page 113</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 |
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>Hohenwarter, M [http://tube.geogebra.org/m/125392 Pythagorean theorem by shear mapping]; made using [[GeoGebra]]. Drag the sliders to observe the shears</ref> as well as the related [[Geometric_mean_theorem#Based_on_shear_mappings|geometric mean theorem]]. |
||
Shear matrices are often used in [[computer graphics]].<ref>{{harvtxt|Foley|van Dam|Feiner|Hughes|1991|pp=207–208,216–217}}</ref><ref>[https://books.google.com/books?id=3Q7HGBx1uLIC Geometric Tools for Computer Graphics], Philip J. Schneider and David H. Eberly, pp. 154-157</ref><ref>[https://books.google.com/books?id=WQiIj8ZS0IoC Computer Graphics], Apueva A. Desai, pp. 162-164</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 [[pixel]]s at a time.<ref>Alan Paeth (1986), [http://www.cipprs.org/papers/VI/VI1986/pp077-081-Paeth-1986.pdf ''A Fast Algorithm for General Raster Rotation''.] Proceedings of Graphics Interface '86, pages 77–81.</ref> |
|||
An algorithm due to [[Alan W. Paeth]] uses [[Rotation_matrix#Decomposition_into_shears|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 [[pixel]]s at a time.<ref>A.W. Paeth (1986), [https://www.cipprs.org/archive/vi/VI1986/pp077-081-Paeth-1986.pdf ''A Fast Algorithm for General Raster Rotation''.] Vision Interface (VI1986) pp 077-081.</ref> |
|||
The italics text can be thought of as normal text under a shear. |
|||
==See Also== |
|||
In [[typography]], normal text transformed by a shear mapping results in [[oblique type]]. |
|||
* [[Shear matrix]] |
|||
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]]. |
|||
==See also== |
|||
* [[Transformation matrix]] |
|||
==References== |
==References== |
||
{{commons category|Shear (geometry)}} |
{{commons category|Shear (geometry)}} |
||
{{Wikibooks |Abstract Algebra|Shear and Slope|Shear mapping}} |
|||
{{reflist}} |
{{reflist}} |
||
==Bibliography== |
|||
* {{citation | first1 = James D. | last1 = Foley | first2 = Andries | last2 = van Dam | first3 = Steven K. | last3 = Feiner | first4 = John F. | last4 = Hughes | year = 1991 | isbn = 0-201-12110-7 | title = Computer Graphics: Principles and Practice | edition = 2nd | publisher = [[Addison-Wesley]] | location = Reading | url-access = registration | url = https://archive.org/details/computergraphics00fole }} |
|||
{{Computer graphics}} |
|||
{{Matrix classes}} |
|||
[[Category:Functions and mappings]] |
[[Category:Functions and mappings]] |
||
[[Category:Linear algebra]] |
[[Category:Linear algebra]] |
Latest revision as of 14:31, 26 May 2024
![Mesh Shear 5/4](http://upload.wikimedia.org/wikipedia/commons/thumb/0/01/VerticalShear_m%3D1.25_%28blue_and_red%29.svg/250px-VerticalShear_m%3D1.25_%28blue_and_red%29.svg.png)
![](http://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Laminar_shear.svg/250px-Laminar_shear.svg.png)
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.[1] 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 to the point . In this case, the displacement is horizontal by a factor of 2 where the fixed line is the x-axis, and the signed distance is the y-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 n-dimensional Cartesian space the distance is measured from a fixed hyperplane parallel to the direction of displacement. This geometric transformation is a linear transformation of that preserves the n-dimensional measure (hypervolume) of any set.
Definition
[edit]Horizontal and vertical shear of the plane
[edit]![](http://upload.wikimedia.org/wikipedia/commons/thumb/8/8a/SVG_skewX.svg/250px-SVG_skewX.svg.png)
In the plane , a horizontal shear (or shear parallel to the x-axis) is a function that takes a generic point with coordinates to the point ; where m 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 y-coordinate. Any point above the x-axis is displaced to the right (increasing x) if m > 0, and to the left if m < 0. Points below the x-axis move in the opposite direction, while points on the axis stay fixed.
Straight lines parallel to the x-axis remain where they are, while all other lines are turned (by various angles) about the point where they cross the x-axis. Vertical lines, in particular, become oblique lines with slope Therefore, the shear factor m is the cotangent of the shear angle between the former verticals and the x-axis. (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:
A vertical shear (or shear parallel to the y-axis) of lines is similar, except that the roles of x and y are swapped. It corresponds to multiplying the coordinate vector by the transposed matrix:
The vertical shear displaces points to the right of the y-axis up or down, depending on the sign of m. It leaves vertical lines invariant, but tilts all other lines about the point where they meet the y-axis. Horizontal lines, in particular, get tilted by the shear angle to become lines with slope m.
Composition
[edit]Two or more shear transformations can be combined.
If two shear matrices are and
then their composition matrix is which also has determinant 1, so that area is preserved.
In particular, if , we have
which is a positive definite matrix.
Higher dimensions
[edit]A typical shear matrix is of the form
This matrix shears parallel to the x axis in the direction of the fourth dimension of the underlying vector space.
A shear parallel to the x axis results in and . In matrix form:
Similarly, a shear parallel to the y axis has and . In matrix form:
In 3D space this matrix shear the YZ plane into the diagonal plane passing through these 3 points:
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 S is a shear matrix with shear element λ, then Sn is a shear matrix whose shear element is simply nλ. Hence, raising a shear matrix to a power n multiplies its shear factor by n.
Properties
[edit]If S is an n × n shear matrix, then:
- S has rank n and therefore is invertible
- 1 is the only eigenvalue of S, so det S = 1 and tr S = n
- the eigenspace of S (associated with the eigenvalue 1) has n − 1 dimensions.
- S is defective
- S is asymmetric
- S may be made into a block matrix by at most 1 column interchange and 1 row interchange operation
- the area, volume, or any higher order interior capacity of a polytope is invariant under the shear transformation of the polytope's vertices.
General shear mappings
[edit]For a vector space V and subspace W, a shear fixing W translates all vectors in a direction parallel to W.
To be more precise, if V is the direct sum of W and W′, and we write vectors as
correspondingly, the typical shear L fixing W is
where M is a linear mapping from W′ into W. Therefore in block matrix terms L can be represented as
Applications
[edit]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."[2]
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[3] as well as the related geometric mean theorem.
Shear matrices are often used in computer graphics.[4][5][6]
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.[7]
In typography, normal text transformed by a shear mapping results in oblique type.
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.
See also
[edit]References
[edit]![](http://upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/30px-Commons-logo.svg.png)
![](http://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png)
- ^ Definition according to Weisstein, Eric W. Shear From MathWorld − A Wolfram Web Resource
- ^ William Kingdon Clifford (1885) Common Sense and the Exact Sciences, page 113
- ^ Hohenwarter, M Pythagorean theorem by shear mapping; made using GeoGebra. Drag the sliders to observe the shears
- ^ Foley et al. (1991, pp. 207–208, 216–217)
- ^ Geometric Tools for Computer Graphics, Philip J. Schneider and David H. Eberly, pp. 154-157
- ^ Computer Graphics, Apueva A. Desai, pp. 162-164
- ^ A.W. Paeth (1986), A Fast Algorithm for General Raster Rotation. Vision Interface (VI1986) pp 077-081.
Bibliography
[edit]- Foley, James D.; van Dam, Andries; Feiner, Steven K.; Hughes, John F. (1991), Computer Graphics: Principles and Practice (2nd ed.), Reading: Addison-Wesley, ISBN 0-201-12110-7