3 - Transformations
Outline
- 2์ฐจ์ ๋ณํ
- Scaling, Rotation, Shearing, Reflection
- Translation
- ๋ณํ์ ์ข ๋ฅ
- ๋ณํ์ ํฉ์ฑ๊ณผ Homogeneous Coordinates
- ๋ ๊ฐ์ง 3์ฐจ์ ์ง๊ต ์ขํ๊ณ
- 3์ฐจ์ Affine ๋ณํ
What is Transformation?
- Geometric Transformation
- ๊ธฐํํ์ object์ ์์น, ๋ฐฉํฅ, ํฌ๊ธฐ ๋๋ ํํ๋ฅผ ์ํ์ ์ผ๋ก ๋ณ๊ฒฝํ๋ ๊ณผ์
โ โ์ ๋ค์ ์งํฉ์ ์ด๋์ํค๋ ๊ฒโ - ๋ณต์กํ ์ฅ๋ฉด๊ณผ ์ ๋๋ฉ์ด์ ์์ฑ์ ๊ฐ๋ฅํ๊ฒ ํจ
- Computer graphics์์ ํ์์ ์
- ๊ธฐํํ์ object์ ์์น, ๋ฐฉํฅ, ํฌ๊ธฐ ๋๋ ํํ๋ฅผ ์ํ์ ์ผ๋ก ๋ณ๊ฒฝํ๋ ๊ณผ์
- ์์:
- Translate
- Rotate
- Scale
- Shear
- Reflect
Transformation
- โ์ ๋ค์ ์งํฉ์ ์ด๋์ํค๋ ๊ฒโ
- Transformation T๋ ๋ฒกํฐ ๊ณต๊ฐ S์ ์๋ ์์์ ์ ๋ ฅ ๋ฒกํฐ v๋ฅผ T(v)๋ก ์ฌ์(ๅฏซๅ)ํจ
- ์์ ํํ:
Linear Transformation
- ํ๋ ฌ ๊ณฑ์ ํตํด Transformation์ ์ ์ํ ์ ์์
- ์ด๋ ํ๋ ฌ ๊ณฑ์
์ด ์ ํ ์ฌ์(ๅฏซๅ)์ ๋ํ๋ด๊ฒ ๋๋ฏ๋ก
linear transformation์ด๋ผ ๋ถ๋ฆ - Linear transformation์ ๋ค์ ์กฐ๊ฑด์ ๋ง์กฑํด์ผ ํจ:
- ํ๋ ฌ ๋ํ ๋์ผํ *์ ํ์ฑ(linearity)*์ ๋ง์กฑ:
2D Linear Transformations
- 2ร2 ํ๋ ฌ์ ๋ค์๊ณผ ๊ฐ์ 2์ฐจ์ linear transformation์ ํํํ ์ ์์:
- uniform scaling
- non-uniform scaling
- rotation
- shearing
- reflection
2D Linear Trans. โ Uniform Scaling
- x์ถ๊ณผ y์ถ ๋ชจ๋์์ ๋์ผํ ๋น์จ๋ก ํ๋ ๋๋ ์ถ์
- ์: ๋ฐฐ์จ ( s = 1.5 )์ธ scaling์ ์ ์ฉํ ๊ฒฝ์ฐ,
2D Linear Trans. โ Nonuniform Scaling
- x์ถ๊ณผ y์ถ ๋ฐฉํฅ์ผ๋ก ์๋ก ๋ค๋ฅธ ๋น์จ๋ก ํ๋ ๋๋ ์ถ์
(์: = 1.5, = 0.8 โ ์ถ ๋ฐฉํฅ์ ํ๋, ์ถ ๋ฐฉํฅ์ ์ถ์)
2D Linear Trans. โ Rotation
- ํ์ ์ ํ๋ ฌ ๊ณฑ์ผ๋ก ํํ ๊ฐ๋ฅํ๋ฉฐ, ๋ฐ๋ผ์ ์ ํ ๋ณํ์
- ์์ ๊ฐ๋๋ ๋ฐ์๊ณ ๋ฐฉํฅ(CCW, Counter-Clockwise)์ ์๋ฏธํจ
(์: โ 30๋ ๋ฐ์๊ณ ํ์ )
Numbers in Matrices: Scaling, Rotation
- ํ๋ ฌ์ ๊ฐ ์ซ์๋ ์ด๋ค ์๋ฏธ๋ฅผ ๊ฐ์ง๊น?
- ๋จ์ ๋ฒกํฐ์ ๊ธฐ์ค์ผ๋ก scaling ๋๋ rotation ์ ๊ฐ๊ฐ์ column vector๊ฐ ๋ณํ๋ ์ถ์ ๋ฐฉํฅ์ ๋ํ๋
- Canonical basis vectors: ์ง๊ต ์ขํ๊ณ์์ x, y์ถ ๋ฐฉํฅ ๋จ์ ๋ฒกํฐ
- ๊ฒฐ๊ณผ์ ์ผ๋ก, ๋ณํ๋ ์ขํ๊ณ์ ์ถ ๋ฐฉํฅ์ ๋ํ๋
- ํ๋ ฌ์ column vector๋ ๊ทธ ํ๋ ฌ์ column space๋ฅผ ๊ตฌ์ฑํ๋ basis vectors
- Column space: column vector๋ค์ ์ ํ ๊ฒฐํฉ์ผ๋ก ํํ ๊ฐ๋ฅํ ๋ชจ๋ ๋ฒกํฐ์ ์งํฉ
2D Linear Trans. โ Reflection
- Reflection์ non-uniform scaling์ ํน์ํ ๊ฒฝ์ฐ๋ก ๊ฐ์ฃผํ ์ ์์
- ์์: ์ถ ๋ฐฉํฅ reflection
2D Linear Trans. โ Shearing
- ๋ฌผ์ฒด๋ฅผ ์ธก๋ฉด์ผ๋ก ๋ฐ๊ธฐ(push sideways)
- ์์: ์ถ ๊ธฐ์ค์ผ๋ก ์ ๋น๋กํ์ฌ ์ด๋
Identity Matrix
- ์๋ฌด๋ฐ ๋ณํ๋ ์ํํ์ง ์๋ ํ๋ ฌ โ "Doing nothing"
(๋ํ์ ์์น, ํฌ๊ธฐ, ๋ฐฉํฅ์ด ์ ์ง๋จ)
[Demo] 2D Linear Transformations
- integral-domain.org/lwilliams/Applets/algebra/linearTransformations.php
- ํ๋ ฌ ์์์ ๊ฐ์ ๋ฐ๊ฟ๋ณด์ธ์
- ๋ค์ํ ๋ณํ ๋ฒํผ์ ๋๋ฌ๋ณด์ธ์
Quiz 1
2D Translation
- Translation์ ๊ฐ์ฅ ๊ฐ๋จํ ๋ณํ:
- ์ญ๋ณํ(Inverse):
(๋์: ๋ฒกํฐ์์ ๋งํผ ์ด๋ํ ๊ฒฐ๊ณผ๊ฐ )
Is translation linear transformation?
์๋์ค. ์ ํ ๋ณํ(linear transformation)์ด ์๋
์ ํ์ฑ(linearity)์ ๋ง์กฑํ์ง ์์:
์:
๋ฒกํฐ ๋ง์ ์ ์ฌ์ฉํด ํํ ๊ฐ๋ฅ:
์ ํ ๋ณํ๊ณผ ๊ฒฐํฉํ ์ ์์:
โ Affine transformation
Letโs check again
- Linear transformation
- Scaling, Rotation, Reflection, Shearing
- ํ๋ ฌ ๊ณฑ์ ์ผ๋ก ํํ ๊ฐ๋ฅ
- Translation
- ์ ํ ๋ณํ์ด ์๋
- ๋ฒกํฐ ๋ง์ ์ผ๋ก ํํ๋จ
- Affine transformation
- ์ ํ ๋ณํ๊ณผ translation์ ๊ฒฐํฉํ ํํ
Rigid Transformations
- ๋ชจ๋ ์ ์ฌ์ด์ ๊ฑฐ๋ฆฌ๋ฅผ ์ ์งํจ
- "Handedness"๋ฅผ ๋ณด์กดํจ:
- ์ ํ ๋ณํ ์ค handedness๋ฅผ ๋ณด์กดํ๋ ํ์ ์ ์กฐ๊ฑด:
- Reflection์ ๋ณด์กดํ์ง ์์
- Translation์ ๋ฐฉํฅ์ ๋ฐ๊พธ์ง ์์ผ๋ฏ๋ก ์ํฅ์ ์ฃผ์ง ์์
- ์ ํ ๋ณํ ์ค handedness๋ฅผ ๋ณด์กดํ๋ ํ์ ์ ์กฐ๊ฑด:
- Rigid transformation์ ์:
- Translation
- Identity
- Rotation
- ์ผ๋ถ ๋ฌธํ์์๋ reflection์ rigid๋ก ๋ถ๋ฅํ๊ธฐ๋ ํ๋, ๋ณธ ๊ฐ์์์๋ ํฌํจํ์ง ์์
Similarity Transformations
- ๊ฐ๋๋ฅผ ๋ณด์กดํจ
- (rigid transformation๋ ๊ฐ๋ ๋ณด์กด ํฌํจ)
- Similarity transformation์ ์:
- Translation
- Identity
- Rotation
- Uniform Scaling
- ์ผ๋ถ ๋ฌธํ์์๋ reflection๋ ํฌํจํ๋, ๋ณธ ๊ฐ์์์๋ ๋ค๋ฃจ์ง ์์
Linear Transformations
- ์์ ์ ๋ณด์กดํจ
- ํฌํจ๋๋ ๋ณํ๋ค:
- Translation
- Identity
- Rotation
- Uniform Scaling
- Scaling
- Reflection
- Shearing
Affine Transformations
- ํํ์ ์ ์ ์งํจ
- ์ง์ ์์ ๊ฑฐ๋ฆฌ ๋น์จ์ ์ ์งํจ
Projective Transformations
- ์ง์ ์ ๋ณด์กดํจ

Composition of Transformations
- ์ด๋ค ๋ฌผ์ฒด์ T ๋ณํ์ ์ ์ฉํ ํ, S ๋ณํ์ ์ถ๊ฐ ์ ์ฉ:
- 2D linear transformation์ ํฉ์ฑ์
2ร2 ํ๋ ฌ ๊ณฑ์ ์ผ๋ก ํํ ๊ฐ๋ฅ:
Order Matters!
- ํ๋ ฌ ๊ณฑ์
์ ๊ฒฐํฉ๋ฒ์น์ ์ฑ๋ฆฝํ์ง๋ง ๊ตํ๋ฒ์น์ ์ฑ๋ฆฝํ์ง ์์:
- ๋ฐ๋ผ์, ๋ณํ์ ์ ์ฉ ์์๊ฐ ๋งค์ฐ ์ค์ํจ
(์: Scale โ Rotate vs Rotate โ Scale ๊ฒฐ๊ณผ๊ฐ ๋ค๋ฆ)
[Demo] Composition of Linear Transformations
- integral-domain.org/lwilliams/Applets/algebra/linearTransformations.php
- identity matrix๋ก ์ด๊ธฐํ (1 0 0 1 ์ ๋ ฅ)
- "Compose Transformations" ๋ฒํผ ํด๋ฆญ
- ๋ ๊ฐ์ ๋ณํ์ ์๋ก ๋ค๋ฅธ ์์๋ก ์ ์ฉํด๋ณด๊ธฐ
Problems when handling Translation as Vector Addition
- ์ ํ ๋ณํ(ํ์ , ์ค์ผ์ผ ๋ฑ)๊ณผ translation์
์ผ๊ด๋ ๋ฐฉ์์ผ๋ก ํํํ ์ ์์ - Affine ๋ณํ์ ํฉ์ฑ์ ๋ณต์กํด์ง:
- ๋ ๊น๋ํ ํํ ๋ฐฉ์์ด ํ์ํจ
โ Homogeneous coordinates
Homogeneous Coordinates
- ํต์ฌ ์์ด๋์ด: 2D ์ ์ 3D ์ขํ๊ณ ์์ ํํ
- ๋ฒกํฐ์๋ ์ถ๊ฐ ์ฑ๋ถ(), ํ๋ ฌ์๋ ์ถ๊ฐ ํ/์ด์ ์ถ๊ฐ
- ์ ์๋ ํญ์
- 2D ์
- 2D linear transformation์ ํํ:
- 2D translation์ ํํ:
- 2D affine transformation์ ํํ:
- Affine transformation ํฉ์ฑ์ 3ร3 ํ๋ ฌ ๊ณฑ์ ์ผ๋ก ๊ฐ๋จํ๊ฒ ์ฒ๋ฆฌ ๊ฐ๋ฅ:
โ block ํ๋ ฌ ํํ:
- ๊ฒฐ๊ณผ๋ ์ด์ ๋ฐฉ์๊ณผ ๊ฐ์ง๋ง, ํจ์ฌ ๊ฐ๋จํ๊ณ ๊น๋ํจ
cf. ๊ธฐ์กด ํํ๊ณผ ๋น๊ต:
[Demo] Composition of Affine Transformations in Homogeneous Coordinates
- observablehq.com/@esperanc/transformation-demo
- โ+โ ๋ฒํผ์ผ๋ก ๋ค์ํ ์์์ translation ๋ฐ linear transformation ์ถ๊ฐ
- ์ฌ๋ผ์ด๋๋ก ํ๋ ฌ ๊ฐ์ ๋ณํ์ ๋ํ ๋ณํ ํ์ธ
- ์ฃผ์: ๋ง์ง๋ง์ ์ถ๊ฐ๋ ๋ณํ์ด ๊ฐ์ฅ ๋จผ์ ์ ์ฉ๋จ
Summary: Homogeneous Coordinates in 2D
- 2D ์ ์๋ ๋์ ์ฌ์ฉ
- 2D linear transformation์๋ 2ร2 ํ๋ ฌ ๋์ 3ร3 ํ๋ ฌ ์ฌ์ฉ
- 2D translation์๋ ๋ฒกํฐ ๋ง์ ๋์ 3ร3 ํ๋ ฌ ์ฌ์ฉ
โ linear transformation๊ณผ translation์ ์ผ๊ด๋ ๋ฐฉ์์ผ๋ก ์ฒ๋ฆฌํ ์ ์์!
Quiz 2
Now, Letโs go to the 3D world!
- Coordinate system (์ขํ๊ณ)
- Cartesian coordinate system (์ง๊ต์ขํ๊ณ)
- 2D ์ขํ๊ณ โ z์ถ์ด ํฌํจ๋ 3D ์ขํ๊ณ๋ก ํ์ฅ๋จ
- Cartesian coordinate system (์ง๊ต์ขํ๊ณ)
Right-Handed and Left-Handed Coordinate Systems
- ์ฐ๋ฆฌ๊ฐ ์ฌ์ฉํ๋ ์์คํ : Right-handed Cartesian Coordinates
| ํญ๋ชฉ | Right-handed | Left-handed |
|---|---|---|
| ํ์ ๋ฐฉํฅ | ์ถ ๊ธฐ์ค ๋ฐ์๊ณ ๋ฐฉํฅ | ์ถ ๊ธฐ์ค ์๊ณ ๋ฐฉํฅ |
| ์ฌ์ฉ ์์ | OpenGL, Maya, Houdini, AutoCAD, Physics & Math | DirectX, Unity, Unreal ๋ฑ |
(์ด๋ฏธ์ง: ์ค๋ฅธ์ ๋ฒ์น๊ณผ ์ผ์ ๋ฒ์น ์ค๋ช )
Point Representations in Cartesian & Homogeneous Coordinate System
A 2D point is represented as:
- Cartesian coordinate system:
- Homogeneous coordinate system:
A 3D point is represented as:
- Cartesian coordinate system:
- Homogeneous coordinate system:
Review of Linear Transformations in 2D
- 2D์์์ ์ ํ ๋ณํ์ ๋ค์๊ณผ ๊ฐ์ ํ๋ ฌ ๊ณฑ์ ์ผ๋ก ํํ๋จ:
2x2 matrix (in Cartesian coordinates):
or
3x3 matrix (in homogeneous coordinates):
Linear Transformations in 3D
3D์์์ ์ ํ ๋ณํ์ ๋ค์ ํ๋ ฌ ๊ณฑ์ ์ผ๋ก ํํ๋จ:
- 3x3 matrix (in Cartesian coordinates)
๋๋ - 4x4 matrix (in homogeneous coordinates)
- 3x3 matrix (in Cartesian coordinates)
Linear Transformations in 3D
Scaling (ํฌ๊ธฐ ์กฐ์ ):
Shear (in , based on position):
Linear Transformations in 3D
Rotation about -axis:
Rotation about -axis:
Rotation about -axis:
(์ค๋ฅธ์ ๋ฒ์น์ ๋ฐ๋ผ z์ถ์ ๊ธฐ์ค์ผ๋ก ์์์ ์๋๋ก ๋ณด๋ ์์ ์์ ๋ฐ์๊ณ ๋ฐฉํฅ ํ์ )
Review of Translations in 2D
- 2D์์์ Translation์ ๋ค์ ๋ ๋ฐฉ์์ผ๋ก ํํ ๊ฐ๋ฅ:
Vector addition (in Cartesian coordinates):
Matrix multiplication (in homogeneous coordinates):
Translations in 3D
- 3D์์์ Translation๋ ์ ์ฌํ๊ฒ ํํ ๊ฐ๋ฅ:
Vector addition (Cartesian coordinates):
Matrix multiplication (homogeneous coordinates):
Review of Affine Transformations in 2D
- Homogeneous coordinates์์๋ 2D affine transformation์ 3ร3 ํ๋ ฌ ๊ณฑ์ผ๋ก ํํํ ์ ์์:
Affine Transformations in 3D
- Homogeneous coordinates์์๋ 3D affine transformation์
4ร4 ํ๋ ฌ ๊ณฑ์ผ๋ก ํํํ ์ ์์:
Summary: Affine Transformation
- ๋ผ๋ ์ ์งํฉ์ ๋ํด affine transformation ์ ์ ์ฉํ๋ฉด:
Summary: Composition of Affine Transformations
- ์ฌ๋ฌ ๊ฐ์ affine transformation (์: Mโ, Mโ)์ ์์ฐจ์ ์ผ๋ก ์ ์ฉํ ์ ์์
- ๊ฐ ์ ๋ง๋ค ๊ฐ๋ณ์ ์ผ๋ก:

