-->

별의 공부 블로그 🧑🏻‍💻
728x90

Geometric Transformations

Geometric Transformation, T

  • T is a function
    • Geometric structure A → Geometric structure B
  • A geo. structure is represented by a set of points or vectors in 2D o 3D in the general case.

 

2D Examples

Scaling

● Scale by 2 in the y-axis. → S(1,2)
x=x
y=2y

● Scale by 0.5 in the x-axis. → S(0.5,1)
x=0.5x
y=y

● Scale by sx and sy in the x and y-axis respectively. → S(sx,sy)
x=sxx
y=syy

 

Rotation

● Rotate by 45˚ about the origin. → R(45˚)
x=cos(45˚)xsin(45˚)y
y=sin(45˚)x+cos(45˚)y

※ Because of the Law of Cosine.

● Rotate by θ˚ about the origin. → R(θ)
▶ x=cos(θ˚)xsin(θ˚)y
▶ y=sin(θ˚)x+cos(θ˚)y

 

Translation

● Translate by 2 in the x-axis. → T(2,0)
x=x+2
y=y

● Translate by -1 in the y-axis. → T(0,1)
x=x
y=y1

● Translate by tx and ty in the x and y-axis, respectively. → T(tx,ty)

x=x+tx
y=y+ty

 

Composite Transformations(합성 변환)

Example 1
  • Rotate by 45˚ about the origin, then scale by 2 in the y-axis.
    • R(45˚)S(1,2)

 

R(45˚)
x=cos45˚xsin45˚y
y=sin45˚x+cos45˚y

S(1,2)
x=1x
y=2y



R(45˚)S(1,2)
x=1·(cos45˚xsin45˚y)
y=2·(sin45˚x+cos45˚y)

 

Example 2
  • R(45˚)S(1,2)R(45˚)T(1,0)

 

R(45˚)
x=cos45˚xsin45˚y
y=sin45˚x+cos45˚y

S(1,2)
x=1x
y=2y

R(45˚)
x=cos(45˚)xsin(45˚)y
y=sin(45˚)x+cos(45˚)y

T(1,0)
x=x1
y=y



R(45˚)S(1,2)R(45˚)T(1,0)
x=cos(45˚)·(1·(cos(45˚)xsin(45˚)y)sin(45˚)·(sin(45˚)x+cos(45˚)y)1
y=sin(45˚)·1·(cos45˚xsin45˚y)+cos(45˚)·2·(sin45˚x+cos45˚y)

 

2×2 Matrix Form

  • Scale by sx and sy.
x=sxx
y=syy
=> [xy]=[sx00sy][xy]
  • Rotate by θ˚ about the origin.
x=cos(θ˚)xsin(θ˚)y
y=sin(θ˚)x+cos(θ˚)y
=> [xy]=[cosθsinθsinθcosθ][xy]

 

  • Translate by tx and ty.
x=x+tx
y=y+ty
=> [xy]=[xy]+[txty]

 

Questions

  • Calculate new points of a, b and c after applying following transformations.
    1. Scale by 3 along the x-axis.
    2. Rotate by 90 degree.
    3. Translate by 2 along the x-axis and -2 along the y-axis.

 

3×3 Matrix Form (Homogeneous Coordinates(동차 좌표))

  • Scale by sx and sy.
x=sxx
y=syy
=> [xy1]=[sx000sy0001][xy1]
  • Rotate by θ˚ about the origin.
x=cos(θ˚)xsin(θ˚)y
y=sin(θ˚)x+cos(θ˚)y
=> [xy1]=[cosθsinθ0sinθcosθ0001][xy1]

 

  • Translate by tx and ty.
x=x+tx
y=y+ty
=> [xy1]=[10tx01ty001][xy1]

 

Composite Transformations

Example 1 
  • R(45˚)S(1,2)

 

Example 2
  • R(45˚)S(1,2)R(45˚)T(1,0)

 

[xy1]=[101010001][cos(45˚)sin(45˚)0sin(45˚)cos(45˚)0001][100020001][cos45˚sin45˚0sin45˚cos45˚0001][xy1]
[xy1]=[1.50.510.51.50001][xy1]

 

Ignoring the translation

  • Translation시키지 않고, Scaling, Rotation을 바꾸고 싶을 경우, 끝 부분을 0으로 바꿔주면 된다.

 

Summary

  • 2D Transformation
    • Scaling
    • Rotation
    • Translation
  • Homogenous Coordinate(동차좌표)
    • Allows to represent scaling, rotation and translation in a single matrix.

 

 

In 3D Space

Transformation in 3D Space (Homogeneous Coordinates)

Transformation Equations
3D Translation
3D Scaling
Rotation

3D Rotation around z-axis, x-axis and y-axis

 

Transformations

① Linear Transformation(선형 변환)

2D Spaces
3D Spaces

 

  • A Linear Transformation T is a mapping between vector spaces.
    • T is a function that maps vectors to vectors.
      • T:vv,        v,vRn
    • Linear Combination is invariant(불변한) under T
      • T(ni=0civi)=c0T(v0)+c1T(v1)++cnT(vn)

 

Examples of Linear Transformations

2D Rotation
2D Scaling
2D Shear
Along X-axis

Along Y-axis

2D Reflection
Along X-axis

Along Y-axis

 

Properties of Linear Transformations

  • Any Linear Transformation between 3D spaces can be represented by a 3×3 matrix.
  • Any Linear Transformation between 3D spaces can be represented by as a combination of rotation, shear and scaling.
  • Rotation can be represented as a combination of scaling and shear.
  • A Linear Transformation maps lines to lines.
  • A Linear Transformation maps parallel lines to parallel lines.
  • A Linear Transformation preserves ratios of distance along a line.
  • A Linear Transformation does not preserve absolute distances and angles.

 

 

② Affine Transformation(아핀 변환)

2D Spaces
3D Spaces

 

  • An Affine Transformation T is a mapping between affine spaces.
    • T is a function that maps vectors to vectors, and points to points.
      • T:vv,        v,vRn
      • T:pp,        p,pRn
    • Affine Combination is invariant(불변한) under T
      • T(ni=0cipi)=c0T(p0)+c1T(p1)++cnT(pn)

 

Homogeneous Coordinates

  • Any Affine Transformation between 2D spaces can be represented by a 3×3 matrix.
    • T(p)=(M2×2T2×101)(p2×11)
  • Any Affine Transformation between 3D spaces can be represented by a 4×4 matrix.
    • T(p)=(M3×3T3×101)(p3×11)

 

Affine Transformations (Homogenous Coordinates)

2D Spaces
3D Spaces

 

Examples of Affine Transformations

2D Rotation
2D Scaling
2D Shear
2D Reflection
2D Translation

 

  • 2D Transformation for vectors
    • Translation is simply ignored.

 

Properties of Linear Transformations

  • Any Affine Transformation between 3D spaces can be represented as a combination of a Linear Combination followed by Translation.
  • An Affine Transformation maps lines to lines.
  • An Affine Transformation maps parallel lines to parallel lines.
  • An Affine Transformation preserves ratios of distance along a line.
  • An Affine Transformation does not preserve absolute distances and angles.

 

 

③ Rigid Transformation(강체 변환)

2D Spaces
3D Spaces

 

  • A Rigid Transformation T is a mapping between affine spaces.
    • T is a function that maps vectors to vectors, and points to points.
      • T:vv,        v,vRn
      • T:pp,        p,pRn
    • T preserves distances between all points.
    • T cross product for all vectors (to avoid reflection)

 

Rigid Body Rotation

  • Rigid body transformations allow only rotation and translation.
  • Rotation matrics from SO(3)

 

Taxonomy(분류) of Transformations

 

 

Composite Transformation(합성 변환)

Functionalization

Translation
Scaling
Rotation

 

Composite Transformations

Composite 2D Translation
Composite 2D Scaling
Composite 2D Rotation

 

  • Suppose we want,

  • We have to compose two transformations.

 

  • Matrix Multiplication is not commutative(가환성의, 제시된 수의 순서에 상관 없이 결과가 동일한)
    • T(x,3)×R(90˚)R(90˚)×T(x,3)

 

Pivot-Point Rotation

  • Rotation with respect to a pivot point (x, y)

 

Fixed-Point Scaling

  • Scaling with respect to a fixed point (x, y)

 

Scaling Direction

  • Scaling along an arbitrary axis

 

728x90


📖 Contents 📖
Geometric TransformationsGeometric Transformation, T2D ExamplesScalingRotationTranslationComposite Transformations(합성 변환)2×2 Matrix FormQuestions3×3 Matrix Form (Homogeneous Coordinates(동차 좌표))Composite TransformationsIgnoring the translationSummaryIn 3D SpaceTransformation in 3D Space (Homogeneous Coordinates)Transformations① Linear Transformation(선형 변환)Examples of Linear TransformationsProperties of Linear Transformations② Affine Transformation(아핀 변환)Homogeneous CoordinatesAffine Transformations (Homogenous Coordinates)Examples of Affine TransformationsProperties of Linear Transformations③ Rigid Transformation(강체 변환)Rigid Body RotationTaxonomy(분류) of TransformationsComposite Transformation(합성 변환)FunctionalizationComposite TransformationsPivot-Point RotationFixed-Point ScalingScaling Direction