Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphics Graphics Korea University cgvr.korea.ac.kr 1.2 Notation and Definition 2002. 03. 20 그래픽스 연구실 정병선.

Similar presentations


Presentation on theme: "Graphics Graphics Korea University cgvr.korea.ac.kr 1.2 Notation and Definition 2002. 03. 20 그래픽스 연구실 정병선."— Presentation transcript:

1 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 1.2 Notation and Definition 2002. 03. 20 그래픽스 연구실 정병선

2 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Mathematical Definition (1/2) TypeNotationExamples anglelower-case Greek scalarlower-case italic vector or pointlower-case bolda,u,v s,h(ρ),h z matrixcapital boldT(t),X,R x (ρ) planeπ: a vector + a scalar π: n·x + d, π 1 :n 1 ·x+d 1 triangle∆ 3 points∆v 0 v 1 v 2, ∆cba line segmenttwo pointsuv,a i b j geometric entitycapital italic

3 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Mathematical Definition (2/2) OperatorDescription 1:∙dot product 2:cross product 3:vTvT transpose of the vector v 4:piecewise vector multiplication 5:┴the unary, perp dot product operator 6:| ∙ |determinant of a matrix 7:| ∙ |absolute value of a scalar 8:|| ∙ ||length (or norm) of argument

4 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Definition Rendering primitives points, lines, triangles Model or object a collection of geometric entities may have a higher kind of geometrical representation.  ex) Bezier curves or surfaces, NURBS, subdivision surfaces, etc. Scene a collection of models with environment include material descriptions, lighting, viewing specifications.

5 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Appendix A - Some Linear Algebra 2002. 03. 20 그래픽스 연구실 정병선

6 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Euclidean Space (1/6) Vector R n : n-dimensional real Euclidean space v : an n-tuple, i.e. an ordered list of real numbers column-major form

7 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Euclidean Space (2/6) Addition Multiplication by a scalar

8 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Euclidean Space (3/6) Associativity Commutativity Zero identity Additive inverse

9 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Euclidean Space (4/6) Scalar multiple associativity Distributive law Multiplicative identity

10 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Euclidean Space (5/6) Dot product It’s rules

11 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Euclidean Space (6/6) Norm It’s rules

12 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (1/10) Linearly independent Span the Euclidean space R n

13 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (2/10) Basis of R n Dimension of space The largest number of linearly independent vectors in the space

14 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (3/10) Illustration of 3D vector v = (v 0, v 1, v 2 ) u 0, u 1, u 2 : bases right-handed system u0u0 u1u1 u2u2 v v0v0 v1v1 v2v2

15 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (4/10) vector(u) + vector(v) scalar(a) x vector(w) u+v u v v u ww aw -aw

16 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (5/10) Illustration of dot product u v

17 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (6/10) Orthonormal basis Orthogonal basis Standard basis

18 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (7/10) Orthogonal projection u-w u w v

19 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (8/10) Cross product w=uxv u v

20 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (9/10) Laws of calculation of cross product

21 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometrical Interpretation (10/10) Equation of cross product Sarrus’s scheme + + +- - -

22 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (1/15) p x q matrix p rows and q columns

23 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (2/15) Identity(unit) matrix matrix-form counterpart of scalar number one square matrix

24 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (3/15) Matrix-Matrix addition M + N = [m ij ] + [n ij ] = [m ij + n ij ]  (L + M) + N = L + (M + N)  M + N = N + M  M + 0 = M  M – M = 0 Scalar-Matrix multiplication T = aM = [am ij ]  0M = 0  1M = M  a(bM) = (ab)M  a0 = 0  (a + b)M = aM + bM  a(M + N) = aM + aN

25 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (4/15) Transpose of matrix M T = [m ji ]  (aM) T = aM T  (M + N) T = M T + N T  (M T ) T = M  (MN) T = N T M T Trace of matrix

26 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (5/15) Matrix-Matrix multiplication

27 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (6/15) Matrix-Vector multiplication

28 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (7/15) Rules for matrix-matrix multiplication (LM)N = L(MN) (L + M)N = LN + MN MI = IM = M In general, MN ≠ NM Determinant of matrix 2 x 2 matrix

29 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (8/15) 3 x 3 matrix

30 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (9/15) Rules of determinant calculation |M -1 | = 1 / |M| |MN| = |M| |N| |aM| = a n |M| |M T | = |M| If M = [am i, ] or M = [am,j ], then |M| = a|M|. If for i ≠ j, m i, = m j, or m,i = m,j, then |M| = 0. If for some i, m i, = 0 or m,i = 0, then |M| = 0. Orientation of basis |bases| > 0 : right-handed system |bases| < 0 : left-handed system  ex) |e x e y e z | = 1 > 0

31 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (10/15) Adjoint matrix subdeterminant adjoint

32 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (11/15) Inverse of matrix must |M| ≠ 0 If MN = I and NM = I, then N = M -1. Implicit method u = Mv gives v = M -1 u Cramer’s rule

33 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (12/15) Solution by Cramer’s rule for 3 x 3 system Explicit method Gaussian elimination  Mu = Iv General case

34 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (13/15) Import rules of inverse (M -1 ) T = (M T ) -1 (MN) -1 = N -1 M -1 Eigenvalue and Eigenvector Ax = λx (A : square matrix, x : vector, λ : scalar)  x : eigenvector  λ : eigenvalue Theoretical results

35 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (14/15) Orthogonal matrices If MM T = M T M = I, then the sqaure matrix M is orthogonal. Significant implications  |M| = + 1  M -1 = M T  M T : orthogonal  ||Mu|| = ||u||  Mu ┴ Mv iff u ┴ v  If M, N are orthogonal, then MN is orthogonal.

36 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Matrices (15/15) Change of base current coordinate system to another coordinate system Fw = ( f x f y f z )w = v w = F -1 v If F is orthogonal, F -1 = F T.

37 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Homogeneous Notation Point and Vector p = (p x, p y, p z, p w ) T point : p w = 1 vector : p w = 0 Rotation, scaling, shearing and translation rotation, scaling, shear matrixtranslation matrix

38 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometry (1/8) Two-dimensional line (L) d o r(t) td = r(t) - o L Figure of r(t) = o + td n p q L Figure of n · (p – q) = 0 Explicit form Implicit form

39 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometry (2/8) Half-plane test ( f(p) = n · p + c, c = -q · n ) Signed distance L p n

40 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometry (3/8) Three-dimensional line same as two-dimensional line except for 3D Distance p to r(t) p o d w ||(p – o) – w|| r(t)

41 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometry (4/8) Planes (π) Explicit form Implicit form dudu dvdv o p(u,v) = o + ud u + vd v uduudu vdvvdv p q n Figure of p(u,v) = o + ud u + vd v Figure of n · ( p – q ) = 0

42 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometry (5/8) Half-plane test ( f(p) = n · p + d, d = -n · q ) Signed distance  obtained by exchanging the two-dimensional parts of the equation for their three-dimensional counterparts for the plane.  f s (0) = d, d : the shortest signed distance from the origin to the plane.

43 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometry (6/8) Convex hull the smallest set such that the straight line between any two points in the set is totally included in the set as well. rubber band convex hull release

44 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometry (7/8) Area calculation ||v||sinΦ Φ v u p qr

45 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Geometry (8/8) Volume calculation u x v w v u Φ

46 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Chapter 3 - Transforms 2002. 03. 20 그래픽스 연구실 정병선

47 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (1/12) NotationName T(t)translation matrix Rx(ρ)Rx(ρ)rotation matrix R S(s)scaling matrix H ij (s)shear matrix E(h,p,r)Euler transform Po(s)Po(s)orthographic projection Pp(s)Pp(s)perspective projection slerp(q,r,t)slerp transform

48 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (2/12) Translation matrix example

49 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (3/12) Rotation matrix

50 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (4/12) example

51 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (5/12) Scaling matrix example  scaling in a certain direction

52 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (6/12) Shearing matrix  6 basic shearing matrices

53 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (7/12) example

54 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (8/12) Concatenation of transforms example Rotating a unit-square π/6 radians by shearing three times

55 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (9/12) Order dependency multiplication of matrices is not commutative. C = TRS example

56 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (10/12) Rigid-body transform the shape of the object is not affected by transform. so, this transform consists of translations and rotations. matrix

57 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (11/12) Normal transform The surface normal must be transformed by the transpose of the inverse of the matrix used to transform geometry. example

58 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Basic Transforms (12/12) Computation of inverses inversion of parameters  M = T(t)R(Φ) → M -1 = R(- Φ)T(-t) orthogonal matrix  M -1 = M T nothing in particular  Cramer’s rule  Gaussian elimination


Download ppt "Graphics Graphics Korea University cgvr.korea.ac.kr 1.2 Notation and Definition 2002. 03. 20 그래픽스 연구실 정병선."

Similar presentations


Ads by Google