260 likes | 497 Views
Mathematics for Computer Graphics. 고려대학교 컴퓨터 그래픽스 연구실. Contents. Coordinate-Reference Frames 2D Cartesian Reference Frames / Polar Coordinates 3D Cartesian Reference Frames / Curvilinear Coordinates Points and Vectors Vector Addition and Scalar Multiplication
E N D
Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr
Contents • Coordinate-Reference Frames • 2D Cartesian Reference Frames / Polar Coordinates • 3D Cartesian Reference Frames / Curvilinear Coordinates • Points and Vectors • Vector Addition and Scalar Multiplication • Scalar Product / Vector Product • Basis Vectors and the Metric Tensor • Orthonormal Basis • Metric Tensor • Matrices • Scalar Multiplication and Matrix Addition • Matrix Multiplication / Transpose • Determinant of a Matrix / Matrix Inverse cgvr.korea.ac.kr
Coordinate Reference Frames • Coordinate Reference Frames • Cartesian coordinate system • x, y, z 좌표축사용, 전형적 좌표계 • Non-Cartesian coordinate system • 특수한 경우의 object표현에 사용. • Polar, Spherical, Cylindrical 좌표계 등 cgvr.korea.ac.kr
2D Cartesian Reference System • 2D Cartesian Reference Frames y x y x Coordinate origin at the lower-left screen corner Coordinate origin in the upper-left screen corner cgvr.korea.ac.kr
Polar Coordinates • 가장 많이 쓰이는 Non-Cartesian System • Elliptical Coordinates, Hyperbolic or Parabolic Plane Coordinates 등 원 이외에 Symmetry를 가진 다른 2차 곡선들로도 좌표계 표현 가능 r cgvr.korea.ac.kr
Why Polar Coordinates? • Circle • 2D Cartesian : 비균등 분포 Polar Coordinate y y d d x x dx dx 균등하게 분포되지 않은 점들 연속된 점들 사이에 일정간격유지 Polar Coordinates Cartesian Coordinates cgvr.korea.ac.kr
3D Cartesian Reference Frames Three Dimensional Point cgvr.korea.ac.kr
3D Cartesian Reference Frames • 오른손 좌표계 • 대부분의 Graphics Package에서 표준 • 왼손 좌표계 • 관찰자로부터 얼마만큼 떨어져 있는지 나타내기에 편리함 • Video Monitor의 좌표계 cgvr.korea.ac.kr
3D Curvilinear Coordinate Systems • General Curvilinear Reference Frame • Orthogonal coordinate system • Each coordinate surfaces intersects at right angles x2 axis x3 = const3 x1 = const1 x3 axis x2 = const2 x1 axis A general Curvilinear coordinate reference frame cgvr.korea.ac.kr
Cylindrical Coordinates Spherical Coordinates z axis z z axis P(,,z) P(r,, ) r y axis y axis x axis x axis 3D Non-Cartesian System cgvr.korea.ac.kr
P2 y2 V y1 P1 x1 x2 Points and Vectors • Point:좌표계의 한 점을 차지, 위치표시 • Vector:두 position간의 차로 정의 • Magnitude와 Direction으로도 표기 cgvr.korea.ac.kr
z V y x Vectors • 3차원에서의Vector • Vector Addition and Scalar Multiplication cgvr.korea.ac.kr
V2 V1 |V2|cos Scalar Product • Definition • For Cartesian Reference Frame • Properties • Commutative • Distributive Dot Product, Inner Product라고도 함 cgvr.korea.ac.kr
V1 V2 V2 u V1 Vector Product • Definition • For Cartesian Reference Frame • Properties • AntiCommutative • Not Associative • Distributive Cross Product, Outer Product라고도 함 cgvr.korea.ac.kr
Scalar Product Vector Product Examples (x2,y2) V2 (x1,y1) V1 (x0,y0) Angle between Two Edges Normal Vector of the Plane cgvr.korea.ac.kr
u2 u1 u3 Basis Vectors • Basis (or a Set of Base Vectors) • Specify the coordinate axes in any reference frame • Linearly independent set of vectors Any other vector in that space can be written as linear combination of them • Vector Space • Contains scalars and vectors • Dimension: the number of base vectors Curvilinear coordinate-axis vectors cgvr.korea.ac.kr
Orthonormal Basis • Normal Basis + Orthogonal Basis • Example • Orthonormal basis for 2D Cartesian reference frame • Orthonormal basis for 3D Cartesian reference frame cgvr.korea.ac.kr
Metric Tensor • Tensor • Quantity having a number of components, depending on the tensor rank and the dimension of the space • Vector – tensor of rank 1, scalar – tensor of rank 0 • Metric Tensor for any General Coordinate System • Rank 2 • Elements: • Symmetric: cgvr.korea.ac.kr
Properties of Metric Tensors • The Elements of a Metric Tensor can be used to Determine • Distance between two points in that space • Transformation equations for conversion to another space • Components of various differential vector operators (such as gradient, divergence, and curl) within that space cgvr.korea.ac.kr
Examples of Metric Tensors • Cartesian Coordinate System • Polar Coordinates cgvr.korea.ac.kr
Matrices • Definition • A rectangular array of quantities • Scalar Multiplication and Matrix Addition cgvr.korea.ac.kr
j-th column i-th row m × = (i,j) l l n m n Matrix Multiplication • Definition • Properties • Not Commutative • Associative • Distributive • Scalar Multiplication cgvr.korea.ac.kr
Matrix Transpose • Definition • Interchanging rows and columns • Transpose of Matrix Product cgvr.korea.ac.kr
Determinant of Matrix • Definition • For a square matrix, combining the matrix elements to product a single number • 2 2 matrix • Determinant of nn Matrix A (n 2) cgvr.korea.ac.kr
Inverse Matrix • Definition • Non-singular matrix • If and only if the determinant of the matrix is non-zero • 2 2 matrix • Properties cgvr.korea.ac.kr