Math Primer for CG Ref: Interactive Computer Graphics, Chap. 4, E. Angel.

Slides:



Advertisements
Similar presentations
Computer Graphics - Geometry & Representation -
Advertisements

Vectors, Points, Lines and Planes Jim Van Verth Lars M. Bishop
1 A camera is modeled as a map from a space pt (X,Y,Z) to a pixel (u,v) by ‘homogeneous coordinates’ have been used to ‘treat’ translations ‘multiplicatively’
Vector Calculus Mengxia Zhu Fall Objective Review vector arithmetic Distinguish points and vectors Relate geometric concepts to their algebraic.
Demetriou/Loizidou – ACSC330 – Chapter 4 Geometric Objects and Transformations Dr. Giorgos A. Demetriou Dr. Stephania Loizidou Himona Computer Science.
Computational Geometry The art of finding algorithms for solving geometrical problems Literature: –M. De Berg et al: Computational Geometry, Springer,
Math Foundations of CG Math 1 Hofstra University.
Computational Geometry The art of finding algorithms for solving geometrical problems Literature: –M. De Berg et al: Computational Geometry, Springer,
CS5500 Computer Graphics March 22, Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Geometry Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and.
Math Foundations of CG Math 1 Hofstra University.
Computer Graphics CSC 630 Lecture 2- Linear Algebra.
Transformations. 2 Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple geometry, most of us.
Vectors.
Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections.
Vectors Tools for Graphics.  To review vector arithmetic, and to relate vectors to objects of interest in graphics.  To relate geometric concepts to.
Graphics Graphics Korea University cgvr.korea.ac.kr 1.2 Notation and Definition 그래픽스 연구실 정병선.
Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Monday, 26 January 2004 William H. Hsu Department of.
Recap of linear algebra: vectors, matrices, transformations, … Background knowledge for 3DM Marc van Kreveld.
ME451 Kinematics and Dynamics of Machine Systems Review of Linear Algebra 2.1 through 2.4 Th, Sept. 08 © Dan Negrut, 2011 ME451, UW-Madison TexPoint fonts.
Geometry CSC 2141 Introduction to Computer Graphics.
1 Geometry. 2 Objectives Introduce the elements of geometry ­Scalars ­Vectors ­Points Develop mathematical operations among them in a coordinate-free.
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.
Intro to 3D Models Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Orthogonal Functions and Fourier Series.
Mathematics for Graphics. 1 Objectives Introduce the elements of geometry  Scalars  Vectors  Points Develop mathematical operations among them in a.
Vectors and the Geometry of Space 9. Vectors 9.2.
Copyright © Cengage Learning. All rights reserved. 12 Vectors and the Geometry of Space.
ME451 Kinematics and Dynamics of Machine Systems Review of Linear Algebra 2.1 through 2.4 Tu, Sept. 07 © Dan Negrut, 2009 ME451, UW-Madison TexPoint fonts.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 52 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 52 Computer Graphics Three-Dimensional Graphics I.
Background Mathematics Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
VECTORS (Ch. 12) Vectors in the plane Definition: A vector v in the Cartesian plane is an ordered pair of real numbers:  a,b . We write v =  a,b  and.
Vector Tools for Computer Graphics
6.4 Vectors and Dot Products. Dot Product is a third vector operation. This vector operation yields a scalar (a single number) not another vector. The.
Chap. 5 Inner Product Spaces 5.1 Length and Dot Product in R n 5.2 Inner Product Spaces 5.3 Orthonormal Bases: Gram-Schmidt Process 5.4 Mathematical Models.
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Chun-Yuan Lin Mathematics for Computer Graphics 2015/12/15 1 CG.
Basic Entities Scalars - real numbers sizes/lengths/angles Vectors - typically 2D, 3D, 4D directions Points - typically 2D, 3D, 4D locations Basic Geometry.
Computer Graphics, KKU. Lecture 41 The Computer Programming Laws Any given program, when running, is obsolete. Any given program costs more and.
1 Graphics CSCI 343, Fall 2015 Lecture 9 Geometric Objects.
Ch 6 Vector Spaces. Vector Space Axioms X,Y,Z elements of  and α, β elements of  Def of vector addition Def of multiplication of scalar and vector These.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CSC461: Lecture 13 Coordinates Objectives Introduce concepts such as dimension and basis Introduce concepts such as dimension and basis Introduce coordinate.
Basic Theory (for curve 01). 1.1 Points and Vectors  Real life methods for constructing curves and surfaces often start with points and vectors, which.
Computer Graphics I, Fall 2010 Geometry.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Geometry.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Analytic geometry refreshment Szirmay-Kalos László.
Graphics Graphics Korea University kucg.korea.ac.kr Geometric Primitives 고려대학교 컴퓨터 그래픽스 연구실.
Graphics Graphics Korea University kucg.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Introduction; Mathematical Foundations CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Lecture 11 Inner Product Spaces Last Time Change of Basis (Cont.) Length and Dot Product in R n Inner Product Spaces Elementary Linear Algebra R. Larsen.
Spaces.
Vector Spaces B.A./B.Sc. III: Mathematics (Paper II) 1 Vectors in Rn
Mathematics for Computer Graphics
Lecture 7 Vector Space Last Time - Properties of Determinants
CSC461: Lecture 12 Geometry Objectives
Lecture 03: Linear Algebra
C H A P T E R 3 Vectors in 2-Space and 3-Space
Introduction to Computer Graphics with WebGL
3D Transformation CS380: Computer Graphics Sung-Eui Yoon (윤성의)
1.3 Vector Equations.
Elementary Linear Algebra
PPT&Programs
Vector Spaces 1 Vectors in Rn 2 Vector Spaces
Math review - scalars, vectors, and matrices
Presentation transcript:

Math Primer for CG Ref: Interactive Computer Graphics, Chap. 4, E. Angel

Contents Scalar, Vector, Point Change of Basis Frame Change of Frame Affine Sum, Convex Combination, Convex Hull, … Case Study: shooting game

Introduction Three basic data types in CG: scalars, points, and vectors scalar: not a geometric type per se; used in measurement point: a location in space; exist regardless of any coordinate system vector: any quantity with direction and magnitude; does not have fixed location Examine these concepts in a mathematically more rigorous way …

Scalars: Live in Real Space Two fundamental operations are defined between pairs: Addition, multiplication Closure  S,  S,  ·  S  S Commutative   ·  ·  Associative  ·  ·  ·  ·   Distributive  ·  ·  ·  Additive & multiplicative inverse  ·   

Real Analysis The study of real numbers … If you are interested, see Analysis WebNotes:Analysis WebNotes

Vectors: Live in Vector Space Two kinds of entities: Scalar, vector Two operations and corresponding geometric interpretations: v-v addition (head-tail) scalar-v multiplication (scaling of vector) Properties Closure  u,v  V, u+v  V Commutative u+v=v+u Associative  u+(v+w)=(u+v)+w Distributive   (u+v)=  u+  v   )u=  u+  u

Vector Space (cont) Linear combination u=  1 u 1 +  2 u 2 + … +  n u n Linear independent Only set of scalars such that u=  1 u 1 +  2 u 2 + … +  n u n is zero  1 =  2 =…=  n =0 Basis a set of linearly independent vectors that span the space

Vector Space: change of basis represent any vector uniquely in a basis change of basis

Example New Basis

Points: Live in Affine Space Vector space lacks Location, distance, … Concept of coordinate system (frame) Reference point: origin Frame: origin + basis defines position in space Add another entity to vector spaces Point New operations Point – Point  Vector Point + Vector  Point (translation) Note that the following are not defined: point addition multiplication of scalar & point

Affine Space: change of frames Represent point in a frame Change of frame

Euclidean Space Supplement vector space with the notion of distance New operation Inner (dot) product  S  u,v,w  V u · v=v · u (  u+  v) · w=  u · w +  v · w v · v>0 (v  0) 0 · 0=0 u · v=0  u and v are orthogonal |v|=(v · v) ½ u · v=|u||v| cos 

Summary: Mathematical Spaces Real Space (Scalar) Vector Space (Scalar, Vector) Euclidean Space (Scalar, Vector) [distance] Affine Space (Scalar, Vector, Point) [location]

Affine Sum In affine space, point addition is only defined in the following case: Q R P(  ) Point addition is allowed only if their weights add up to one

Affine Sum (cont) More generally, Convex Combination A particular affine sum where weights are non- negative

Convex Hull

Now, how to apply these math Besides change of basis/frame …

Ex: Parametric Equation of a Line Q R S(  ) Q R

Ex: Plane, Triangle, Parallelogram Q R S(  ) P T(  ) (infinite) Plane Parallelogram Triangle

Ex: Homogeneous Coordinates A unified representation scheme in affine space for points and vectors Change of Frame: subsume change of basis

Affine Space: coordinate system fixing the origin of the vectors of coordinate system at P 0 4x1 “ vector ” : Unified vector & point representation homogeneous coordinate distinguish point & vector 4x4 matrix algebra for change in frames Point: [  1  2  3 1] Frame: [u 1 u 2 u 3 P 0 ] Vector: [  1  2  3 0] Frame: [u 1 u 2 u 3 P 0 ]

Ex: Shooting (AABB) Intersection can be checked using 3D Sutherland algorithm

Cohen-Sutherland Line-Clipping Algorithm Trivially accept Trivially reject clipping

Ex: Shooting (OBB) Change of frame then apply Sutherland algorithm in the local frame

Ex: Ray-Triangle Intersection

Ex: Shooting (discrete version)

Ex: Shooting (continuous version)

Exercise Convex Hull: prove convex combination yields the shape you imagine