Matrix3 [그래픽스] 투영 행렬, Look-At 행렬, GLSL 변환 행렬 함수 (Projection Matrices, Look-At Matrices, GLSL Functions for Transformation Matrices) * 이 게시물은 Computer Graphics Programming in OpenGL with C++ 책의 일부를 번역 및 재해석한 게시물입니다. 의역 또는 오역이 있을 수 있으니 참고하시고, 피드백은 댓글을 남겨주세요. 투영 행렬 (Projection Matrices) 우리가 카메라를 설치하였기 때문에, 프로젝션 행렬을 검토할 수 있습니다. 우리가 이제 검토할 두 가지 중요한 프로젝션 행렬은 원근(perspective)과 직교(orthographic)입니다. 1. 원근 투영 행렬 (Perspective Projection Matrices) 원근 투영은 원근의 개념을 활용함으로써 우리가 현실 세계를 볼 때 보는 것을 모방하여 2D 그림을 3D처럼 보이게 합니다. 가까운 오브젝트는 멀리 떨어져 있는 오브.. 2022. 3. 7. [자료구조 프로그래밍 연습문제] 희소행렬 전치 1. sparse matrix transpose 교재에서는 그림 2.4(b)의 6×6 matrix를 그림 2.5(a)의 a 배열로 표현하였다. A. 그림 2.5(a)의 a 배열의 값은 정확한가? 정확하다. B. 그림 2.5(b)의 b 배열은 그림 2.4(b)의 6×6 matrix를 transpose 한 결과이다. 그림 2.5(b)의 b 배열의 값은 정확한가? 정확하다. C. 교재 2.5.3절의 마지막 부분에는 2.5(a)의 a 배열에 대해 프로그램 2.9 fastTranspose()의 3번째 for loop 수행 직후 시점의 rowTerms 배열과 startingPos 배열의 값을 보이고 있다. 이들 값은 정확한가? 정확하다. D. 프로그램 2.9 fastTranspose()로 그림 2.5의 a 배열로부.. 2022. 1. 11. [GLSL] Rotate and Scale https://thebookofshaders.com/08/ The Book of Shaders Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders. thebookofshaders.com https://en.wikipedia.org/wiki/Rotation_matrix Rotation matrix - Wikipedia en.wikipedia.org mat2 rotate2d(float _angle){ return mat2(cos(_angle),-sin(_angle), sin(_angle),cos(_angle)); } #ifdef GL_ES precision mediump float; #endif unif.. 2022. 1. 6. 이전 1 다음