본문 바로가기

Computer Science/Computer Graphics 22

Mesh, OBJ File Mesh 물체를 표현하는 방식에는 다양한 방법들이 있다. 어떠한 일을 처리하느냐에 따라서 적합한 방법을 선택해야한다. 이러한 방법들은 2가지 분류로 구분할 수 있다. explicit 물체가 여기에 있고 직접적으로 표현하는 것이다. point cloud, polygon mesh, subdivision ... implicit 특정 조건들을 만족하는 점들을 찾아서 물체를 만드는 것이다. level set, algebraic surface ... 가장 많이 사용되는 방법이 polygon mesh이다. Polygon Mesh 어떠한 복잡한 물체이더라도 상대적으로 간단한 표현으로 나타낼 수 있고 렌더링이 빠르다. 기본 단위는 polygon과 polygon mesh이다. polygon 직선들로 이루어진 닫힌 모양 p.. 2021. 4. 8.
Rendering Pipeline, Transformation Pipeline Coordinate System and Reference Frame Coordinate system과 reference frame은 유사한 개념으로 혼용되어 사용하기도 한다. Coordinate system Unique한 점의 위치를 표현하기 위해서 한 개 이상의 숫자를 사용하는 system이다. 수학적인 개념으로, 어떤 관찰된 점의 위치를 표현하기 위한 language이다. 즉, 각 reference frame에서 일어나는 움직임을 표현하고 관찰하기 위한 language이다. 예를 들어, cartesian coordinate system는 (x, y, z) 3개의 숫자를 이용해서 위치를 표현한다. Reference frame Abstract coordinate system + physical refer.. 2021. 4. 7.
Affine Frame Coordinate-free (Coordinate-invariant) Coordinate-free는 좌표계와 상관 없이 동일하게 동작하는 개념이다. point와 vector의 개념을 사용한다. points 특정한 좌표계 위에서의 위치를 의미한다. location in space vector 두 개의 points의 차이를 나타낸다. displacements in space origin이 정해지면 point는 origin으로부터의 vector로 표현될 수 있다. 그러나 여전히 좌표가 달라질 수 있기 때문에 coordinate-free하지는 않다. coordinate-invariant에서는 point sum을 할 수 없다. 예를 들어, 두 point의 합은 원점이 어디인지에 따라, 즉 좌표계에 따라 위치가 달.. 2021. 3. 23.
[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.