Scaling (geometry)






geometric transformation



Each iteration of the Sierpinski triangle contains triangles related to the next iteration by a scale factor of 1/2


In Euclidean geometry, uniform scaling (or isotropic scaling[1]) is a linear transformation that enlarges (increases) or shrinks (diminishes) objects by a scale factor that is the same in all directions. The result of uniform scaling is similar (in the geometric sense) to the original. A scale factor of 1 is normally allowed, so that congruent shapes are also classed as similar. Uniform scaling happens, for example, when enlarging or reducing a photograph, or when creating a scale model of a building, car, airplane, etc.


More general is scaling with a separate scale factor for each axis direction. Non-uniform scaling (anisotropic scaling) is obtained when at least one of the scaling factors is different from the others; a special case is directional scaling or stretching (in one direction). Non-uniform scaling changes the shape of the object; e.g. a square may change into a rectangle, or into a parallelogram if the sides of the square are not parallel to the scaling axes (the angles between lines parallel to the axes are preserved, but not all angles). It occurs, for example, when a faraway billboard is viewed from an oblique angle, or when the shadow of a flat object falls on a surface that is not parallel to it.


When the scale factor is larger than 1, (uniform or non-uniform) scaling is sometimes also called dilation or enlargement. When the scale factor is a positive number smaller than 1, scaling is sometimes also called contraction.


In the most general sense, a scaling includes the case in which the directions of scaling are not perpendicular. It also includes the case in which one or more scale factors are equal to zero (projection), and the case of one or more negative scale factors (a directional scaling by -1 is equivalent to a reflection).


Scaling is a linear transformation, and a special case of homothetic transformation. In most cases, the homothetic transformations are non-linear transformations.




Contents






  • 1 Matrix representation


    • 1.1 Scaling in arbitrary dimensions




  • 2 Using homogeneous coordinates


  • 3 Function dilation and contraction


    • 3.1 Particular cases




  • 4 Footnotes


  • 5 See also


  • 6 External links





Matrix representation


A scaling can be represented by a scaling matrix. To scale an object by a vector v = (vx, vy, vz), each point p = (px, py, pz) would need to be multiplied with this scaling matrix:


Sv=[vx000vy000vz].{displaystyle S_{v}={begin{bmatrix}v_{x}&0&0\0&v_{y}&0\0&0&v_{z}\end{bmatrix}}.}S_{v}={begin{bmatrix}v_{x}&0&0\0&v_{y}&0\0&0&v_{z}\end{bmatrix}}.

As shown below, the multiplication will give the expected result:


Svp=[vx000vy000vz][pxpypz]=[vxpxvypyvzpz].{displaystyle S_{v}p={begin{bmatrix}v_{x}&0&0\0&v_{y}&0\0&0&v_{z}\end{bmatrix}}{begin{bmatrix}p_{x}\p_{y}\p_{z}end{bmatrix}}={begin{bmatrix}v_{x}p_{x}\v_{y}p_{y}\v_{z}p_{z}end{bmatrix}}.}S_{v}p={begin{bmatrix}v_{x}&0&0\0&v_{y}&0\0&0&v_{z}\end{bmatrix}}{begin{bmatrix}p_{x}\p_{y}\p_{z}end{bmatrix}}={begin{bmatrix}v_{x}p_{x}\v_{y}p_{y}\v_{z}p_{z}end{bmatrix}}.

Such a scaling changes the diameter of an object by a factor between the scale factors, the area by a factor between the smallest and the largest product of two scale factors, and the volume by the product of all three.


The scaling is uniform if and only if the scaling factors are equal (vx = vy = vz). If all except one of the scale factors are equal to 1, we have directional scaling.


In the case where vx = vy = vz = k, scaling increases the area of any surface by a factor of k2 and the volume of any solid object by a factor of k3.



Scaling in arbitrary dimensions


In n{displaystyle n}n-dimensional space Rn{displaystyle mathbb {R} ^{n}}mathbb {R} ^{n}, uniform scaling by a factor v{displaystyle v}v is accomplished by scalar multiplication with v{displaystyle v}v, that is, multiplying each coordinate of each point by v{displaystyle v}v. As a special case of linear transformation, it can be achieved also by multiplying each point (viewed as a column vector) with a diagonal matrix whose entries on the diagonal are all equal to v{displaystyle v}v, namely vI{displaystyle vI}vI .


Non-uniform scaling is accomplished by multiplication with any symmetric matrix. The eigenvalues of the matrix are the scale factors, and the corresponding eigenvectors are the axes along which each scale factor applies. A special case is a diagonal matrix, with arbitrary numbers v1,v2,…vn{displaystyle v_{1},v_{2},ldots v_{n}}v_{1},v_{2},ldots v_{n} along the diagonal: the axes of scaling are then the coordinate axes, and the transformation scales along each axis i{displaystyle i}i by the factor vi{displaystyle v_{i}}v_{i}


In uniform scaling with a non-zero scale factor, all non-zero vectors retain their direction (as seen from the origin), or all have the direction reversed, depending on the sign of the scaling factor. In non-uniform scaling only the vectors that belong to an eigenspace will retain their direction. A vector that is the sum of two or more non-zero vectors belonging to different eigenspaces will be tilted towards the eigenspace with largest eigenvalue.



Using homogeneous coordinates


In projective geometry, often used in computer graphics, points are represented using homogeneous coordinates. To scale an object by a vector v = (vx, vy, vz), each homogeneous coordinate vector p = (px, py, pz, 1) would need to be multiplied with this projective transformation matrix:


Sv=[vx0000vy0000vz00001].{displaystyle S_{v}={begin{bmatrix}v_{x}&0&0&0\0&v_{y}&0&0\0&0&v_{z}&0\0&0&0&1end{bmatrix}}.}S_{v}={begin{bmatrix}v_{x}&0&0&0\0&v_{y}&0&0\0&0&v_{z}&0\0&0&0&1end{bmatrix}}.

As shown below, the multiplication will give the expected result:


Svp=[vx0000vy0000vz00001][pxpypz1]=[vxpxvypyvzpz1].{displaystyle S_{v}p={begin{bmatrix}v_{x}&0&0&0\0&v_{y}&0&0\0&0&v_{z}&0\0&0&0&1end{bmatrix}}{begin{bmatrix}p_{x}\p_{y}\p_{z}\1end{bmatrix}}={begin{bmatrix}v_{x}p_{x}\v_{y}p_{y}\v_{z}p_{z}\1end{bmatrix}}.}S_{v}p={begin{bmatrix}v_{x}&0&0&0\0&v_{y}&0&0\0&0&v_{z}&0\0&0&0&1end{bmatrix}}{begin{bmatrix}p_{x}\p_{y}\p_{z}\1end{bmatrix}}={begin{bmatrix}v_{x}p_{x}\v_{y}p_{y}\v_{z}p_{z}\1end{bmatrix}}.

Since the last component of a homogeneous coordinate can be viewed as the denominator of the other three components, a uniform scaling by a common factor s (uniform scaling) can be accomplished by using this scaling matrix:


Sv=[1000010000100001s].{displaystyle S_{v}={begin{bmatrix}1&0&0&0\0&1&0&0\0&0&1&0\0&0&0&{frac {1}{s}}end{bmatrix}}.}S_{v}={begin{bmatrix}1&0&0&0\0&1&0&0\0&0&1&0\0&0&0&{frac  {1}{s}}end{bmatrix}}.

For each vector p = (px, py, pz, 1) we would have


Svp=[1000010000100001s][pxpypz1]=[pxpypz1s]{displaystyle S_{v}p={begin{bmatrix}1&0&0&0\0&1&0&0\0&0&1&0\0&0&0&{frac {1}{s}}end{bmatrix}}{begin{bmatrix}p_{x}\p_{y}\p_{z}\1end{bmatrix}}={begin{bmatrix}p_{x}\p_{y}\p_{z}\{frac {1}{s}}end{bmatrix}}}S_{v}p={begin{bmatrix}1&0&0&0\0&1&0&0\0&0&1&0\0&0&0&{frac  {1}{s}}end{bmatrix}}{begin{bmatrix}p_{x}\p_{y}\p_{z}\1end{bmatrix}}={begin{bmatrix}p_{x}\p_{y}\p_{z}\{frac  {1}{s}}end{bmatrix}}

which would be equivalent to


[spxspyspz1].{displaystyle {begin{bmatrix}sp_{x}\sp_{y}\sp_{z}\1end{bmatrix}}.}{begin{bmatrix}sp_{x}\sp_{y}\sp_{z}\1end{bmatrix}}.


Function dilation and contraction


Given a point P(x,y){displaystyle P(x,y)}P(x,y), the dilation associates it with the point P′(x′,y′){displaystyle P'(x',y')}{displaystyle P'(x',y')} through the equations
{x′=mxy′=ny{displaystyle {begin{cases}x'=mx\y'=nyend{cases}}}{displaystyle {begin{cases}x'=mx\y'=nyend{cases}}} for m,n∈R+{displaystyle m,nin mathbb {R} ^{+}}{displaystyle m,nin mathbb {R} ^{+}}


Therefore, given a function y=f(x){displaystyle y=f(x)}y=f(x), the equation of the dilated function is


y=nf(xm){displaystyle y=nfleft({frac {x}{m}}right)}{displaystyle y=nfleft({frac {x}{m}}right)}



Particular cases


If n=1{displaystyle n=1}n=1, the transformation is horizontal; when m>1{displaystyle m>1}m>1, it is a dilation, when m<1{displaystyle m<1}{displaystyle m<1}, it is a contraction.


If m=1{displaystyle m=1}m=1, the transformation is vertical; when n>1{displaystyle n>1}n>1 it is a dilation, when n<1{displaystyle n<1}n<1, it is a contraction.



Footnotes





  1. ^ Durand; Cutler. "Transformations" (PowerPoint). Massachusetts Institute of Technology. Retrieved 12 September 2008..mw-parser-output cite.citation{font-style:inherit}.mw-parser-output .citation q{quotes:"""""""'""'"}.mw-parser-output .citation .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-maint{display:none;color:#33aa33;margin-left:0.3em}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}




See also



  • Dilation (metric space)

  • Homothetic transformation

  • Scale (ratio)

  • Scale (map)

  • Scales of scale models

  • Scale (disambiguation)

  • Scaling in gravity

  • Squeeze mapping

  • Transformation matrix



External links







  • Understanding 2D Scaling and Understanding 3D Scaling by Roger Germundsson, The Wolfram Demonstrations Project.











Popular posts from this blog

Shashamane

Carrot

Deprivation index