카테고리 없음

[Computer Graphics] 2. Affine Geometry

easy038 2025. 3. 13. 00:29

2D 이미지

- 디지털 이미지는 픽셀의 격자로 이루어져 있음

- RGB 색상 모델 : 각 픽셀의 색은 Red, Green, Blue 의 세 가지 값으로 표현

 

3D 데이터

- Mesh : A collection of interconnected geometric elements forming a 3D object

  • Vertex(정점) : (x, y, z) 좌표로 정의된 점
  • Edge : 두 정점을 연결하는 선분
  • Face (면) : A closed loop of edges forming a flat surface

 

 

Rendering

: converting a 3D model into a 2D image (apply lighting, textures, and shading)

- Ray Tracing : 카메라에서 광선을 쏴서 물체와의 충돌을 계산한 후, 색상을 결정하는 방식

- Rasterization : 3D 객체를 화면에 투영하여 2D 픽셀에 채우는 방식

단계 과정
Vertex Processing 3D 정점 --> 화면 좌표 변환
Triangle Processing 정점 연결 --> 삼각형 구성
Rasterization 삼각형 --> 픽셀 변환
Fragment Processing 픽셀별 색상, 조명, 텍스처 처리
Framebuffer Operations 최종 이미지 출력

 

 

3D 모델이 화면에 표시되는 과정

1) 3D 객체들을 계층 구조(hierarchical)로 구성하여 로컬 좌표계에서 정의

2) 월드 좌표계에 배치

3) 카메라 위치와 시점을 설정하여 최종적으로 2D 이미지로 변환

 

 

 

Geometric Programming

- vector, point, transform을 다루는 방법

- 일반적으로 **동차 좌표(Homogeneous Coordinates)**를 사용

- Affine Geometry와 coordinate-invariant geometric programming 에 대해 알아볼 것임

* Affine Geometry : 점과 벡터의 구조를 설명하는 기하학 / 원점이 고정되지 않음

 

What is Geometry?

- "Geometry is the study of shapes(도형) and spatial(공간) relationships"

- Explores the properties of points / lines / surfaces / solids

- Different approaches

  • Coordinate-free Geometry(좌표 없는 기하학) : 숫자 없이 점과 도형의 관계를 분석
  • Coordinate-based Geometry(좌표 기반 기하학) : 수학적인 표현식(방정식, 벡터 등)으로 분석
  • Coordinate-invariant Geometry(좌표 불변 기하학) : 좌표계에 영향을 받지 않는 기하학

Coordinate-free Geometry

- 실제 세계에는 좌표가 존재하지 않음

- 기하학적 특성은 숫자 좌표 없이도 성립 가능함

- 예시) 좌표 없이 컴퍼스와 자 만으로 선분의 중점 찾기

 

Coordinate-based Geometry

- 좌표계를 이용한 수학적인 분석 방법

- 예시) Cartesain Geometry / (x,y) 좌표를 이용한 중점 찾기

 

Why Coordinate-invariant Geometry?

coordinate-invariant Geometry는 특정 좌표계에 의존하지 않고 기하학적 연산(operations)을 수행하는 기법으로,

수학적 방법이 필수적으로 요구된다.

특히, Affine Geometry는 coordinate-invariant Geometry를 이해하는 핵심적인 프레임워크를 제공한다.

 

Geometric Elements

- point : specific location / no direction or size

- vector : direction and magnitude(크기)

 

Vector spaces consists of

- set of vectors

- Two operations : Vector addition / Scalar multiplication

 

Properties of Vector Spaces

A set of vectors forms a vector space if it satisties the following conditions

- If u and v are in the space, then u+v and cu are also in the space

- 덧셈의 교환법칙, 결합법칙이 성립

- 영벡터가 존재

- 곱셈의 교환법칙과 분배법칙이 성립

- A linear combination of vectors is also a vector

 

Affine Space consists of

- Set of points

- An associated vector space

- Additional operations on points

 

Coordinate-invariant Geometrip Operations

- Addition

 

 

- Subtraction

- Scalar multiplication

- Linear combination

 

 

 

Affine Combination

- 여러 개의 점(벡터)을 특정 가중치를 사용하여 결합하는 연산 방식

- 가중치의 총합이 1이 되도록 설정된 선형 결합(Linear Combination)

 

 

 

 

 

 

Affine Space : Valid and Invalid Operations

1) point + point = undefined

2) point - point = vector (백터를 생성하는 연산)

3) point ± vector = point (점을 이동하는 연산)

4) vector ± vector = vector 

5) scalar · vector = vector

6) ∑scalar · vector = vector

7) scalar · point = point (if scalar =1)

                          = vector (if scalar =0)

                          = undefined (otherwise) (점은 스칼라 곱셈이 허용되지 않기 때문)

8) ∑scalar · point = point (if ∑scalar =1)

                             = vector (if ∑scalar =0)

                             = undefined (otherwise)

 

 

 

Matrix Representation of Affine map

1) Linear Transformation

 

 

2) Affine Transformation