본문 바로가기

transformation 3

[OpenGL] Transformation Matrix Fundamental Idea of Transformation Numpy의 matrix multiplication을 이용하든 OpenGL transformation function을 이용하는 것이든, 결국 transformation의 기본적인 접근은 행렬의 곱을 이용하는 것이다. Current Transformation Matrix OpenGL은 "state machine"이다. 즉, 하나의 상태가 지정되면 그 상태는 새로운 상태가 지정될 때까지 그대로 있는다. 상태는 current color, current transformation matrix 등이 포함된다. OpenGL은 항상 current transformation matrix을 이용하여 object를 그린다. Current transformat.. 2021. 3. 23.
Transformation in 3D 3D Cartesian Coordinate System 왼쪽은 2차원 좌표평면에서의 모습이고, 오른쪽은 3차원 좌표공간에서의 모습이다. 그런데 3차원의 경우 z축을 어디로 잡느냐를 결정해야 한다. 둘 다 사용하고 있으며 앞쪽으로 나와있는 것을 Right-handed cartesian coordinates라고 하고, 뒤쪽으로 빠져있는 것을 Left-handed cartesian coordinates라고 한다. Right-handed vs Left-handed coordinates systems 오른손을 폈을 때 손가락이 x축을 향하고 그 상태로 손가락을 접었을 때 y축을 향하게 두었을 때, z축이 엄지손가락 방향이면 Right-handed cartesian coordinates이다. 반면에 왼손으로 했을 .. 2021. 3. 16.
Transformation in 2D Transformation Geometric transformation(기하 변환)이란 기하학적인 구조를 가진 집합을 one-to-one mapping을 통해 옮기는 것으로, 쉽게말해서 점들의 집합을 이동시키는 것이다. Vector space S에 있는 임의의 input vector v을 S에서 T로 옮기는 것으로, 다음과 같이 나타낼 수 있다. $S \rightarrow \{ T(v) | v \in S \}$ 평행이동(translate), 회전(rotate), 확대/축소(scale), 전단(shear), 대칭(reflect) 등이 있다. 그래픽 movement, image/object manipulation, viewing, projection transform 등에 사용된다. Linear Transf.. 2021. 3. 16.