banner.gif
On-Line Computer Graphics Notes
SHEARING


Overview

Shearing transformations in three-dimensions alter two of the three coordinate values proportionally to the value of the third coordinate.

pdficonsmall.gif For a pdf version of these notes look here.


The X-Shear Transformation

Given a frame $ {\cal F} =( {\vec u} , {\vec v} , {\vec w} , {\bf O} )$. We ``x-shear'' a frame by modifying the first vector of the frame by adding to it a linear combination of the other two vectors. The frame transformation takes the following form

$\displaystyle \left[
\begin{array}{c}
{\vec u} \\
{\vec v} \\
{\vec w} \\  ...
...c v} + b {\vec w} \\
{\vec v} \\
{\vec w} \\
{\bf O}
\end{array}\right]
$

An illustration of this process is given in the following figure.

\includegraphics {figures/x-shear}

This transform can be implemented by the following $ 4 \times 4$ matrix:

$\displaystyle \left[
\begin{array}{cccc}
1 & a & b & 0 \\
0 & 1 & 0 & 0 \\
...
...c v} + b {\vec w} \\
{\vec v} \\
{\vec w} \\
{\bf O}
\end{array}\right]
$

and so we define the $ x$-shear transformation by

$\displaystyle {H} _ {x; a,b } \; = \;
\left[
\begin{array}{cccc}
1 & a & b & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
\end{array}\right]
$

If this transformation is applied to the point $ (u,v,w)$, we obtain

$\displaystyle \left[
\begin{array}{cccc}
u & v & w & 1
\end{array}\right]
\left...
...
\: = \:
\left[
\begin{array}{cccc}
u & au + v & bu + w & 1
\end{array}\right]
$

and thus objects can be sheared by applying this matrix to all points of the object.


The Y-Shear Transformation

Given a frame $ {\cal F} =( {\vec u} , {\vec v} , {\vec w} , {\bf O} )$. We ``y-shear'' a frame by transforming the second vector by adding a linear combination of the other two vectors. The frame transformation takes the following form

$\displaystyle \left[
\begin{array}{c}
{\vec u} \\
{\vec v} \\
{\vec w} \\  ...
...\vec u} + {\vec v} + b {\vec w} \\
{\vec w} \\
{\bf O}
\end{array}\right]
$

An illustration of this process is given in the following figure.

\includegraphics {figures/y-shear}

This transform can be implemented by the following $ 4 \times 4$ matrix:

$\displaystyle \left[
\begin{array}{cccc}
1 & 0 & 0 & 0 \\
a & 1 & b & 0 \\
...
...\vec u} + {\vec v} + b {\vec w} \\
{\vec w} \\
{\bf O}
\end{array}\right]
$

and so we define the $ y$-shear transformation by

$\displaystyle {H} _ {y; a,b } \; = \;
\left[
\begin{array}{cccc}
1 & 0 & 0 & 0 \\
a & 1 & b & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
\end{array}\right]
$

If this transformation is applied to the point $ (u,v,w)$, we obtain

$\displaystyle \left[
\begin{array}{cccc}
u & v & w & 1
\end{array}\right]
\left...
...
\: = \:
\left[
\begin{array}{cccc}
u + av & v & w + bv & 1
\end{array}\right]
$

and thus objects can be sheared by applying this matrix to all points of the object.


The Z-Shear Transformation

Given a frame $ {\cal F} =( {\vec u} , {\vec v} , {\vec w} , {\bf O} )$. We ``z-shear'' a frame by transforming the third vector by adding a linear combination of the other two vectors. The frame transformation takes the following form

$\displaystyle \left[
\begin{array}{c}
{\vec u} \\
{\vec v} \\
{\vec w} \\  ...
...ec v} \\
a {\vec u} + b {\vec v} + {\vec w} \\
{\bf O}
\end{array}\right]
$

which is illustrated by

\includegraphics {figures/z-shear}

This transform can be implemented by the following $ 4 \times 4$ matrix:

$\displaystyle \left[
\begin{array}{cccc}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
...
...ec v} \\
a {\vec u} + b {\vec v} + {\vec w} \\
{\bf O}
\end{array}\right]
$

and so we define the $ z$-shear transformation by

$\displaystyle {H} _ {z; a,b } \; = \;
\left[
\begin{array}{cccc}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
a & b & 1 & 0 \\
0 & 0 & 0 & 1 \\
\end{array}\right]
$

If this transformation is applied to the point $ (u,v,w)$, we obtain

$\displaystyle \left[
\begin{array}{cccc}
u & v & w & 1
\end{array}\right]
\left...
...
\: = \:
\left[
\begin{array}{cccc}
u + aw & v + bw & w & 1
\end{array}\right]
$

and thus objects can be sheared by applying this matrix to all points of the object.


Return to the Graphics Notes Home Page
Return to the Geometric Modeling Notes Home Page
Return to the UC Davis Visualization and Graphics Group Home Page


This document maintained by Ken Joy

Mail us your comments

All contents copyright (c) 1996, 1997, 1998, 1999
Computer Science Department
University of California, Davis

All rights reserved.


Ken Joy
1999-12-06