CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.

Slides:



Advertisements
Similar presentations
Points, Vectors, Lines, Spheres and Matrices
Advertisements

CS 450: COMPUTER GRAPHICS LINEAR ALGEBRA REVIEW SPRING 2015 DR. MICHAEL J. REALE.
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
12 VECTORS AND THE GEOMETRY OF SPACE.
Chapter 3 Vectors.
Geometry (Many slides adapted from Octavia Camps and Amitabh Varshney)
6 6.1 © 2012 Pearson Education, Inc. Orthogonality and Least Squares INNER PRODUCT, LENGTH, AND ORTHOGONALITY.
Chapter 4.1 Mathematical Concepts
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
3-D Geometry.
Computer Graphics CSC 630 Lecture 2- Linear Algebra.
Chapter 2: Vectors Ian Parberry University of North Texas Fletcher Dunn Valve Software 3D Math Primer for Graphics and Game Development.
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
Copyright © 2014 John Wiley & Sons, Inc. All rights reserved.
Vectors.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
Vectors and scalars A scalar quantity can be described by a single number, with some meaningful unit 4 oranges 20 miles 5 miles/hour 10 Joules of energy.
Vectors and Scalars Vector and scalar quantities Adding vectors geometrically Components Unit Vectors Dot Products Cross Products pps by C Gliniewicz.
Chapter 3: VECTORS 3-2 Vectors and Scalars 3-2 Vectors and Scalars
Vector Operation and Force Analysis
VECTORS AND THE GEOMETRY OF SPACE Vectors VECTORS AND THE GEOMETRY OF SPACE In this section, we will learn about: Vectors and their applications.
Section 9.2 Vectors Goals Goals Introduce vectors. Introduce vectors. Begin to discuss operations with vectors and vector components. Begin to discuss.
Basics of Linear Algebra A review?. Matrix  Mathematical term essentially corresponding to an array  An arrangement of numbers into rows and columns.
Chapter 3 Vectors.
Mathematical Fundamentals
Phys211C1V p1 Vectors Scalars: a physical quantity described by a single number Vector: a physical quantity which has a magnitude (size) and direction.
Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)
1 February 24 Matrices 3.2 Matrices; Row reduction Standard form of a set of linear equations: Chapter 3 Linear Algebra Matrix of coefficients: Augmented.
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Recap of linear algebra: vectors, matrices, transformations, … Background knowledge for 3DM Marc van Kreveld.
Chapter 4.1 Mathematical Concepts
ME 2304: 3D Geometry & Vector Calculus
Vectors. Vectors and Direction Vectors are quantities that have a size and a direction. Vectors are quantities that have a size and a direction. A quantity.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
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.
CSCE 552 Spring 2011 Math By Jijun Tang. Layered.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Vectors and the Geometry of Space 9. Vectors 9.2.
Copyright © Cengage Learning. All rights reserved. 12 Vectors and the Geometry of Space.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
VECTORS. Pythagorean Theorem Recall that a right triangle has a 90° angle as one of its angles. The side that is opposite the 90° angle is called the.
Introduction to Matrices and Vectors Sebastian van Delden USC Upstate
Vectors Addition is commutative (vi) If vector u is multiplied by a scalar k, then the product ku is a vector in the same direction as u but k times the.
Midterm Review  Five Problems 2-D/3-D Vectors, 2-D/3-D equilibrium, Dot Product, EoE, Cross Product, Moments  Closed Book & Note  Allowed to bring.
CGDD 4003 THE MATH LECTURE (BOILED DOWN, YET LIGHTLY SALTED)
Chapter 3 Vectors. Vector quantities  Physical quantities that have both numerical and directional properties Mathematical operations of vectors in this.
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Chun-Yuan Lin Mathematics for Computer Graphics 2015/12/15 1 CG.
VECTORS AND THE GEOMETRY OF SPACE. The Cross Product In this section, we will learn about: Cross products of vectors and their applications. VECTORS AND.
CSCE 552 Spring 2011 Math By Jijun Tang. Languages C/C++ Java Script: Flash, Python, LISP, etc. C# XNA for PC and Xbox.
Computer Graphics Matrices
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Vectors Some quantities can be described with only a number. These quantities have magnitude (amount) only and are referred to as scalar quantities. Scalar.
 An image is the new figure, and the preimage is the original figure  Transformations-move or change a figure in some way to produce an image.
Chapter 3 Lecture 5: Vectors HW1 (problems): 1.18, 1.27, 2.11, 2.17, 2.21, 2.35, 2.51, 2.67 Due Thursday, Feb. 11.
Computer Graphics Mathematical Fundamentals Lecture 10 Taqdees A. Siddiqi
Computer Graphics Lecture 11 2D Transformations I Taqdees A. Siddiqi
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry "Old Henry And His Old Aunt" Defined using right triangle  x y h.
Graphics Graphics Korea University kucg.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
CSCE 552 Spring 2009 Game Architecture and Math By Jijun Tang.
Lecture 1 Linear algebra Vectors, matrices. Linear algebra Encyclopedia Britannica:“a branch of mathematics that is concerned with mathematical structures.
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.
CA 302 Computer Graphics and Visual Programming
Math Fundamentals Maths revisit.
Lecture 03: Linear Algebra
CSE 411 Computer Graphics Lecture #2 Mathematical Foundations
Game Programming Algorithms and Techniques
Presentation transcript:

CSCE 590E Spring 2007 Basic Math By Jijun Tang

Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h

Applied Trigonometry Angles measured in radians Full circle contains 2  radians

Trigonometry

Trigonometric identities

Inverse trigonometric functions Return angle for which sin, cos, or tan function produces a particular value If sin  = z, then  = sin -1 z If cos  = z, then  = cos -1 z If tan  = z, then  = tan -1 z

arcs

Vectors and Matrices Scalars represent quantities that can be described fully using one value  Mass  Time  Distance Vectors describe a magnitude and direction together using multiple values

Vectors and Matrices Two vectors V and W are added by placing the beginning of W at the end of V Subtraction reverses the second vector V W V + W V W V V – WV – W –W–W

Vectors and Matrices Vectors add and subtract componentwise

Vectors and Matrices The magnitude of an n-dimensional vector V is given by In three dimensions, this is

Vectors and Matrices A vector having a magnitude of 1 is called a unit vector Any vector V can be resized to unit length by dividing it by its magnitude: This process is called normalization

Vectors and Matrices A matrix is a rectangular array of numbers arranged as rows and columns  A matrix having n rows and m columns is an n  m matrix  At the right, M is a 2  3 matrix  If n = m, the matrix is a square matrix

Vectors and Matrices The transpose of a matrix M is denoted M T and has its rows and columns exchanged:

Vectors and Matrices An n-dimensional vector V can be thought of as an n  1 column matrix: Or a 1  n row matrix:

Vectors and Matrices Product of two matrices A and B  Number of columns of A must equal number of rows of B  Entries of the product are given by  If A is a n  m matrix, and B is an m  p matrix, then AB is an n  p matrix

Vectors and Matrices Example matrix product

Vectors and Matrices Matrices are used to transform vectors from one coordinate system to another In three dimensions, the product of a matrix and a column vector looks like:

Identity Matrix I n For any n  n matrix M, the product with the identity matrix is M itself  I n M = M  MI n = M

Invertible An n  n matrix M is invertible if there exists another matrix G such that The inverse of M is denoted M -1

Determinant The determinant of a square matrix M is denoted det M or |M| A matrix is invertible if its determinant is not zero For a 2  2 matrix,

Determinant The determinant of a 3  3 matrix is

Inverse Explicit formulas exist for matrix inverses  These are good for small matrices, but other methods are generally used for larger matrices  In computer graphics, we are usually dealing with 2  2, 3  3, and a special form of 4  4 matrices

Vectors and Matrices A special type of 4  4 matrix used in computer graphics looks like  R is a 3  3 rotation matrix, and T is a translation vector

Vectors and Matrices The inverse of this 4  4 matrix is

The Dot Product The dot product is a product between two vectors that produces a scalar The dot product between two n-dimensional vectors V and W is given by In three dimensions,

The Dot Product The dot product can be used to project one vector onto another  V W

The Dot Product The dot product satisfies the formula   is the angle between the two vectors  Dot product is always 0 between perpendicular vectors  If V and W are unit vectors, the dot product is 1 for parallel vectors pointing in the same direction, -1 for opposite

The Dot Product The dot product of a vector with itself produces the squared magnitude Often, the notation V 2 is used as shorthand for V  V

The Cross Product The cross product is a product between two vectors the produces a vector  The cross product only applies in three dimensions  The cross product is perpendicular to both vectors being multiplied together  The cross product between two parallel vectors is the zero vector (0, 0, 0)

The Cross Product The cross product between V and W is A helpful tool for remembering this formula is the pseudodeterminant

The Cross Product The cross product can also be expressed as the matrix-vector product The perpendicularity property means

The Cross Product The cross product satisfies the trigonometric relationship This is the area of the parallelogram formed by V and W  V W ||V|| sin 

The Cross Product The area A of a triangle with vertices P 1, P 2, and P 3 is thus given by

The Cross Product Cross products obey the right hand rule  If first vector points along right thumb, and second vector points along right fingers,  Then cross product points out of right palm Reversing order of vectors negates the cross product:  Cross product is anticommutative

Transformations Calculations are often carried out in many different coordinate systems We must be able to transform information from one coordinate system to another easily Matrix multiplication allows us to do this

Transformations Suppose that the coordinate axes in one coordinate system correspond to the directions R, S, and T in another Then we transform a vector V to the RST system as follows

ILLustration

Transformation matrix We transform back to the original system by inverting the matrix: Often, the matrix ’ s inverse is equal to its transpose — such a matrix is called orthogonal

Transformations A 3  3 matrix can reorient the coordinate axes in any way, but it leaves the origin fixed We must add a translation component D to move the origin:

Transformations Homogeneous coordinates  Four-dimensional space  Combines 3  3 matrix and translation into one 4  4 matrix

Transformations V is now a four-dimensional vector  The w-coordinate of V determines whether V is a point or a direction vector  If w = 0, then V is a direction vector and the fourth column of the transformation matrix has no effect  If w  0, then V is a point and the fourth column of the matrix translates the origin  Normally, w = 1 for points

Transformations The three-dimensional counterpart of a four-dimensional homogeneous vector V is given by Scaling a homogeneous vector thus has no effect on its actual 3D value

Transformations Transformation matrices are often the result of combining several simple transformations  Translations  Scales  Rotations Transformations are combined by multiplying their matrices together

Transformation Steps

Orderings

Orderings of different type is important A rotation followed by a translation is different from a translation followed by a rotation Orderings of the same type does not matter

Transformations Translation matrix Translates the origin by the vector T

Transformations Scale matrix Scales coordinate axes by a, b, and c If a = b = c, the scale is uniform

Transformations Rotation matrix Rotates points about the z-axis through the angle 

Transformations Similar matrices for rotations about x, y

Transformations Normal vectors transform differently than do ordinary points and directions  A normal vector represents the direction pointing out of a surface  A normal vector is perpendicular to the tangent plane  If a matrix M transforms points from one coordinate system to another, then normal vectors must be transformed by (M -1 ) T

Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line corresponds to a value of the parameter t Two lines are parallel if their direction vectors are parallel

Geometry A plane in 3D space can be defined by a normal direction N and a point P Other points in the plane satisfy P Q N

Geometry A plane equation is commonly written A, B, and C are the components of the normal direction N, and D is given by for any point P in the plane

Geometry A plane is often represented by the 4D vector (A, B, C, D) If a 4D homogeneous point P lies in the plane, then (A, B, C, D)  P = 0 If a point does not lie in the plane, then the dot product tells us which side of the plane the point lies on

Geometry Distance d from a point P to a line S + t V P VS d

Geometry Use Pythagorean theorem: Taking square root, If V is unit length, then V 2 = 1

Geometry Intersection of a line and a plane  Let P(t) = S + t V be the line  Let L = (N, D) be the plane  We want to find t such that L  P(t) = 0  Careful, S has w-coordinate of 1, and V has w-coordinate of 0

Geometry If L  V = 0, the line is parallel to the plane and no intersection occurs Otherwise, the point of intersection is