Mathematics for Computer Graphics

Slides:



Advertisements
Similar presentations
Matrices A matrix is a rectangular array of quantities (numbers, expressions or function), arranged in m rows and n columns x 3y.
Advertisements

Matrix Algebra Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. Often referred to as Linear Algebra.
Maths for Computer Graphics
Chapter 4.1 Mathematical Concepts
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
Now Playing: My Mathematical Mind Spoon From Gimme Fiction Released May 10, 2005.
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Computer Graphics CSC 630 Lecture 2- Linear Algebra.
Chapter 2 Matrices Definition of a matrix.
Computer Graphics using OpenGL, 3 rd Edition F. S. Hill, Jr. and S. Kelley Chapter Vector Tools for Graphics.
Lecture 2: Geometry vs Linear Algebra Points-Vectors and Distance-Norm Shang-Hua Teng.
Vectors.
Graphics Graphics Korea University cgvr.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
1-1 Engineering Electromagnetics Chapter 1: Vector Analysis.
Fall Scalar Quantity (mass, speed, voltage, current and power) 1- Real number (one variable) 2- Complex number (two variables) Vector Algebra (velocity,
Darryl Michael/GE CRD Fields and Waves Lesson 2.1 VECTORS and VECTOR CALCULUS.
2IV60 Computer Graphics Basic Math for CG
Computer Vision Group Prof. Daniel Cremers Autonomous Navigation for Flying Robots Lecture 2.1: Recap on Linear Algebra Daniel Cremers Technische Universität.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)
Mathematics for Computer Graphics (Appendix A) Won-Ki Jeong.
Scalars and Vectors Scalars are quantities that are fully described by a magnitude (or numerical value) alone. Vectors are quantities that are fully described.
Graphics Graphics Korea University cgvr.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Mathematical Foundations Sections A-1 to A-5 Some of the material in these slides may have been adapted from university of Virginia, MIT and Åbo Akademi.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
Mathematics for Graphics. 1 Objectives Introduce the elements of geometry  Scalars  Vectors  Points Develop mathematical operations among them in a.
Graphics Graphics Korea University Mathematics for Computer Graphics Graphics Laboratory Korea University.
Background Mathematics Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
Dr. Hugh Blanton ENTC 3331 Dr. Blanton - ENTC Orthogonal Coordinate Systems 2 Fields and Waves VECTORS and VECTOR CALCULUS.
Chun-Yuan Lin Mathematics for Computer Graphics 2015/12/15 1 CG.
Computer Graphics, KKU. Lecture 41 The Computer Programming Laws Any given program, when running, is obsolete. Any given program costs more and.
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Graphics Graphics Korea University cgvr.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics I, Fall 2010 Geometry.
Graphics Graphics Korea University cgvr.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics Mathematical Fundamentals Lecture 10 Taqdees A. Siddiqi
Computer Graphics Lecture 11 2D Transformations I Taqdees A. Siddiqi
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
Graphics Graphics Korea University kucg.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
Lecture 1 Linear algebra Vectors, matrices. Linear algebra Encyclopedia Britannica:“a branch of mathematics that is concerned with mathematical structures.
MATRICES A rectangular arrangement of elements is called matrix. Types of matrices: Null matrix: A matrix whose all elements are zero is called a null.
3D Ojbects: Transformations and Modeling. Matrix Operations Matrices have dimensions: Vectors can be thought of as matrices: v=[2,3,4,1] is a 1x4 matrix.
Matrices Introduction.
CA 302 Computer Graphics and Visual Programming
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
Rendering Pipeline Fall, 2015.
Matrices and Vector Concepts
Linear Algebra review (optional)
Mathematics for Computer Graphics
Transforms.
Linear Algebra Lecture 2.
Review of Linear Algebra
Coordinate Reference Frames
Outline Addition and subtraction of vectors Vector decomposition
Engineering Geometry Engineering geometry is the basic geometric elements and forms used in engineering design. Engineering and technical graphics are.
REVIEW PROBLEMS FOR TEST 1 PART 3
Lecture 03: Linear Algebra
ENE/EIE 325 Electromagnetic Fields and Waves
CSE 541 – Numerical Methods
CSE 411 Computer Graphics Lecture #2 Mathematical Foundations
Lecture 2: Geometry vs Linear Algebra Points-Vectors and Distance-Norm
Linear Algebra review (optional)
Math review - scalars, vectors, and matrices
Mathematics for Computer Graphics
Game Programming Algorithms and Techniques
Presentation transcript:

Mathematics for Computer Graphics Graphics Laboratory Korea University http://kucg.korea.ac.kr

Contents Coordinate Systems Points and Vectors Matrices Parametric vs. Nonparametric Representations http://kucg.korea.ac.kr

Coordinate Systems Rectangular (Cartesian) Polar Cylindrical Spherical x, y, z axes Typical coordinate system Right/left-hand system Polar Cylindrical Spherical http://kucg.korea.ac.kr

2D Rectangular Coordinate System x y x Coordinate origin at the lower-left screen corner Coordinate origin at the upper-left screen corner <Window Coordinate System> <Screen Coordinate System> http://kucg.korea.ac.kr

3D Rectangular Coordinate System Right-hand system Standard in most graphics packages Left-hand system Easy to know the distance from the viewer Video monitor coordinate system http://kucg.korea.ac.kr

Polar Coordinate System p(r,) r s  x http://kucg.korea.ac.kr

Why Polar Coordinates in Circles? In rectangular system Irregular distribution of continuous points y y d d x x dx dx Constant Distance among the Adjacent Points Irregularly Distributed Adjacent Points Rectangular Coordinate System Polar Coordinate System http://kucg.korea.ac.kr

Cylindrical / Spherical System x z   r p(r,, ) z y x r  p(r,,z) Cylindrical Coordinate System Spherical Coordinate System http://kucg.korea.ac.kr

Points and Vectors Point: location, position Vector: direction from one point to another Represented by using magnitude and unit direction y P2 y2 V  y1 P1 x x1 x2 http://kucg.korea.ac.kr

Vectors 3D Vector Vector addition and scalar multiplication z V   y    V x z y 3D Vector Vector addition and scalar multiplication http://kucg.korea.ac.kr

Dot Product / Inner Product Scalar Product Definition Properties Commutative Distributive |V2|cos  V2 V1 Dot Product / Inner Product http://kucg.korea.ac.kr

Careful for its direction!!! Vector Product Definition Properties Anti-commutative Not associative Distributive V1 V2 V1  V2  u Cross Product / Outer Product Careful for its direction!!! http://kucg.korea.ac.kr

Plane Normal Calculation Frequently used in Back face detection Shading function Vector product between Two edges of the target polygon N = V1 × V2 P4 V2 P3 P0 V1 P2 P1 http://kucg.korea.ac.kr

Back Face Detection Not drawing the back faces to be culled Can make the drawing speed faster Scalar product between Eye direction Deye and face normal vector Ni If DeyeNi > 0 Fi is back face http://kucg.korea.ac.kr

Back Face Example Eye N4 N3 F4 F3 N2 N5 F2 F5 Eye Direction Deye(1,0) (-0.9, -0.1) N2 (-0.8, 0.2) N3 (-0.2, 0.8) N4 (0.3, 0.7) N5 (0.8, 0.2) F1 F2 F3 F4 F5 http://kucg.korea.ac.kr

Back Face Calculation F1 F2 F3 F4 F5 DeyeN1 = (1,0)(-0.9, -0.1) = -0.9  F1 is a front face F2 DeyeN2 = (1,0)(-0.8, 0.2) = -0.8  F2 is a front face F3 DeyeN3 = (1,0)(-0.2, 0.8) = -0.2  F3 is a front face F4 DeyeN4 = (1,0)(0.3, 0.7) = 0.3  F4 is a back face F5 DeyeN5 = (1,0)(0.8, 0.2) = 0.8  F5 is a back face http://kucg.korea.ac.kr

Back Face Culled Result N4 (0.3, 0.7) N3 (-0.2, 0.8) F4 F3 N2 (-0.8, 0.2) N5 (0.8, 0.2) F2 Eye Direction Deye(1,0) F5 Eye F1 N1 (-0.9, -0.1) http://kucg.korea.ac.kr

<Simple Shading Function> The amount of illumination depends on cos If the incoming light Iin is perpendicular to the surface Isurf is maximum, so the surface is fully illuminated  = 0, cos = 1  N L Isurf: intensity of the surface Iin: intensity of the incident light k: surface reflection coefficient L: direction from the surface to a light source <Simple Shading Function> http://kucg.korea.ac.kr

Matrices Definition Scalar multiplication and matrix addition A rectangular array of quantities Scalar multiplication and matrix addition http://kucg.korea.ac.kr

Matrix Multiplication Definition Properties Not commutative Associative Distributive Scalar multiplication j-th column i-th row × m = l l (i,j) m n n http://kucg.korea.ac.kr

Matrix Transpose Definition Transpose of matrix product Interchanging rows and columns Transpose of matrix product http://kucg.korea.ac.kr

Determinant of Matrix Definition 2  2 matrix For a square matrix Combining the matrix elements to product a single number 2  2 matrix Determinant of nn matrix A (n 2) Determinant of N x N Matrix http://kucg.korea.ac.kr

Inverse Matrix Definition 2  2 matrix Properties Non-singular matrix If and only if the determinant of the matrix is non-zero 2  2 matrix Properties http://kucg.korea.ac.kr

Parametric vs. Nonparametric Representations Circle example in computer graphics radius 2, centered at the origin Parametric expression: x = 2cos, y = 2sin Nonparametric expression Implicit: , explicit: y y Which one is balanced? -2 2 x -2 -1 1 2 x Parametric Expression Interval of : /4 Nonparametric Expression Interval of x: 1 http://kucg.korea.ac.kr

Parametric Representation Easy to draw the shape of an object smoothly Just increase one parameter ex)  The other parameters are automatically calculated by  Especially for symmetric objects Circle, sphere, ellipsoid, etc. Preferred in computer graphics Nonparametric representation is used mainly in numerical analysis http://kucg.korea.ac.kr