Computer Graphics (CS 4731) Lecture 7: Linear Algebra for Graphics (Points, Scalars, Vectors)

Similar documents
Computer Graphics (CS 543) Lecture 3 (Part 1): Linear Algebra for Graphics (Points, Scalars, Vectors)

Things to Memorize: A Partial List. January 27, 2017

Chapter 2. Vectors. 2.1 Vectors Scalars and Vectors

MATH1131 Mathematics 1A Algebra

To Do. Vectors. Motivation and Outline. Vector Addition. Cartesian Coordinates. Foundations of Computer Graphics (Spring 2010) x y

VECTORS, TENSORS, AND MATRICES. 2 + Az. A vector A can be defined by its length A and the direction of a unit

set is not closed under matrix [ multiplication, ] and does not form a group.

1.2 What is a vector? (Section 2.2) Two properties (attributes) of a vector are and.

Analytically, vectors will be represented by lowercase bold-face Latin letters, e.g. a, r, q.

4 VECTORS. 4.0 Introduction. Objectives. Activity 1

2. VECTORS AND MATRICES IN 3 DIMENSIONS

9.4. The Vector Product. Introduction. Prerequisites. Learning Outcomes

On the diagram below the displacement is represented by the directed line segment OA.

Vectors. Introduction. Definition. The Two Components of a Vector. Vectors

Vector differentiation. Chapters 6, 7

Chapter 1 VECTOR ALGEBRA

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams

What we should know about Linear Algebra

DEFINITION OF ASSOCIATIVE OR DIRECT PRODUCT AND ROTATION OF VECTORS

Partial Derivatives. Limits. For a single variable function f (x), the limit lim

LINEAR ALGEBRA APPLIED

Thomas Whitham Sixth Form

S56 (5.3) Vectors.notebook January 29, 2016

Mathematics. Area under Curve.

September 13 Homework Solutions

STRAND J: TRANSFORMATIONS, VECTORS and MATRICES

CHAPTER 10 PARAMETRIC, VECTOR, AND POLAR FUNCTIONS. dy dx

Review of Gaussian Quadrature method

CONIC SECTIONS. Chapter 11

CHAPTER 6 Introduction to Vectors

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

Chapter 9 Definite Integrals

Higher Checklist (Unit 3) Higher Checklist (Unit 3) Vectors

1.2 What is a vector? (Section 2.2) Two properties (attributes) of a vector are and.

11-755/ Machine Learning for Signal Processing. Algebra. Class August Instructor: Bhiksha Raj

P 1 (x 1, y 1 ) is given by,.

Homework Assignment 6 Solution Set

Torsion in Groups of Integral Triangles

Reference. Vector Analysis Chapter 2

MATRIX DEFINITION A matrix is any doubly subscripted array of elements arranged in rows and columns.

Machine Learning for Signal Processing Fundamentals of Linear Algebra

Fundamentals of Linear Algebra

7.1 Integral as Net Change Calculus. What is the total distance traveled? What is the total displacement?

Elementary Linear Algebra

r x a x b x r y a y b y r z a z b z. (3-10 to 3-12) s, multiply v by 1/s. (3-2) The Scalar Product The scalar (or dot) product of two vectors a (3-3)

KINEMATICS OF RIGID BODIES

13.3 CLASSICAL STRAIGHTEDGE AND COMPASS CONSTRUCTIONS

Coordinate geometry and vectors

7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus

A-Level. H 2 M at h e m a CMY. Vectors and Complex Numbers. Singapore Asia Publishers Pte Ltd. ALL RIGHTS RESERVED.

Chapter 7: Applications of Integrals

IMPOSSIBLE NAVIGATION

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT

along the vector 5 a) Find the plane s coordinate after 1 hour. b) Find the plane s coordinate after 2 hours. c) Find the plane s coordinate

Vectors 3-1 VECTORS AND THEIR COMPONENTS. What Is Physics? Vectors and Scalars. Learning Objectives

Stage 11 Prompt Sheet

3. Vectors. Home Page. Title Page. Page 2 of 37. Go Back. Full Screen. Close. Quit

Optimization Lecture 1 Review of Differential Calculus for Functions of Single Variable.

Advanced Algebra & Trigonometry Midterm Review Packet

03 Qudrtic Functions Completing the squre: Generl Form f ( x) x + x + c f ( x) ( x + p) + q where,, nd c re constnts nd 0. (i) (ii) (iii) (iv) *Note t

11-755/ Machine Learning for Signal Processing. Algebra. Class Sep Instructor: Bhiksha Raj

Lesson Notes: Week 40-Vectors

Basics of space and vectors. Points and distance. Vectors

Fundamentals of Linear Algebra

UNIT 5 QUADRATIC FUNCTIONS Lesson 3: Creating Quadratic Equations in Two or More Variables Instruction

Solutions to Physics: Principles with Applications, 5/E, Giancoli Chapter 16 CHAPTER 16

Math 017. Materials With Exercises

KINEMATICS OF RIGID BODIES

ENGI 9420 Lecture Notes 7 - Fourier Series Page 7.01

APPLICATIONS OF DEFINITE INTEGRALS

, MATHS H.O.D.: SUHAG R.KARIYA, BHOPAL, CONIC SECTION PART 8 OF

THREE-DIMENSIONAL KINEMATICS OF RIGID BODIES

The Algebra (al-jabr) of Matrices

Section 14.3 Arc Length and Curvature

PHYS 1114, Lecture 1, January 18 Contents:

Bridging the gap: GCSE AS Level

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved.

Matrices and Determinants

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics

PROPERTIES OF AREAS In general, and for an irregular shape, the definition of the centroid at position ( x, y) is given by

Ellipse. 1. Defini t ions. FREE Download Study Package from website: 11 of 91CONIC SECTION

Module Summary Sheets. FP3, Further Applications of Advanced Mathematics (Version B: reference to new book)

DEFINITION The inner product of two functions f 1 and f 2 on an interval [a, b] is the number. ( f 1, f 2 ) b DEFINITION 11.1.

( ) Straight line graphs, Mixed Exercise 5. 2 b The equation of the line is: 1 a Gradient m= 5. The equation of the line is: y y = m x x = 12.

a * a (2,1) 1,1 0,1 1,1 2,1 hkl 1,0 1,0 2,0 O 2,1 0,1 1,1 0,2 1,2 2,2

( ) where f ( x ) is a. AB/BC Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x).

Alg. Sheet (1) Department : Math Form : 3 rd prep. Sheet

JUST THE MATHS UNIT NUMBER INTEGRATION APPLICATIONS 6 (First moments of an arc) A.J.Hobson

Topics Covered AP Calculus AB

8 factors of x. For our second example, let s raise a power to a power:

Lecture Solution of a System of Linear Equation

INTRODUCTION TO LINEAR ALGEBRA

Numerical Linear Algebra Assignment 008

Shape and measurement

Waveguide Guide: A and V. Ross L. Spencer

k ) and directrix x = h p is A focal chord is a line segment which passes through the focus of a parabola and has endpoints on the parabola.

STATICS VECTOR MECHANICS FOR ENGINEERS: and Centers of Gravity. Eighth Edition CHAPTER. Ferdinand P. Beer E. Russell Johnston, Jr.

Lecture 13 - Linking E, ϕ, and ρ

Distributed Forces: Moments of Inertia

Transcription:

Computer Grphics (CS 4731) Lecture 7: Liner Alger for Grphics (Points, Sclrs, Vectors) Prof Emmnuel Agu Computer Science Dept. Worcester Poltechnic Institute (WPI)

Annoncements Project 1 due net Tuesd, 11.59PM. Midterm in clss net Frid SAs will give the em. I will e w Smple midterm (A 14) lred on clss wesite All code from ook (working progrms) on ook wesite. Quite useful. Tke look

Points, Sclrs nd Vectors Points, vectors defined reltive to coordinte sstem Point: Loction in coordinte sstem Emple: Point (5,4) Cnnot dd or scle points 5 (5,4) 4 (0,0)

Vectors Mgnitude Direction NO position Cn e dded, scled, rotted CG vectors:, 3 or 4 dimensions Length Angle

Vector-Point Reltionship Sutrct points = vector v = Q P P point + vector = point P + v = Q v Q

Vector Opertions Define vectors ( 1,, 3), ) ( 1, 3 Then vector ddition: ( 1 1,, 3 3 ) +

Vector Opertions Define sclr, s Scling vector sclr s ( s, s, 3 1 s ) Note vector sutrction: ( 1 ( 1 ), ( ), 3 ( 3 )) -.5

Vector Opertions: Emples Scling vector sclr Vector ddition: s ( s, s, 3 1 s ) ( 1 1,, 3 3 ) For emple, if =(,5,6) nd =(-,7,1) nd s=6, then ( 3 1 1,, 3 ) (0,1,7) s ( 3 1s, s, s) (1,30,36)

Affine Comintion Given vector (,, 3,..., 1 n 1... n 1 Affine comintion: Sum of ll components = 1 ) Conve ffine = ffine + no negtive component i.e 1,,... n non negtive

Mgnitude of Vector Mgnitude of 1... n Normliing vector (unit vector) â vector mgnitude Note mgnitude of normlied vector = 1. i.e 1... n 1

Mgnitude of Vector Emple: if = (, 5, 6) Mgnitude of 5 6 65 Normliing â 65, 5 65, 6 65

Conve Hull Smllest conve oject contining P 1,P,..P n Formed shrink wrpping points 1

Dot Product (Sclr product) Dot product, d 1 1... 3 3 For emple, if =(,3,1) nd =(0,4,-1) then ( 0) (3 4) (1 1) 01 111

Properties of Dot Products Smmetr (or commuttive): Linerit: Homogeneit: And ) ( ) ( s s c c ) (

Angle Between Two Vectors c cos, sin c c cos, c sin c c c c c cos Sign of.c: c c c.c > 0.c = 0.c < 0

Angle Between Two Vectors Prolem: Find ngle /w vectors = (3,4) nd c = (5,) Step 1: Find mgnitudes of vectors nd c Step : Normlie vectors nd c 5 4, 5 3 ˆ 9, 9 5 ĉ 5 5 4 3 9 5 c

Angle Between Two Vectors Step 3: Find ngle s dot product ˆ cˆ ˆ cˆ 3 5, 4 5 5 9, 9 ˆ cˆ 5 15 9 5 8 9 5 3 9 0.854 Step 4: Find ngle s inverse cosine cos( 0.854) 31.36

Stndrd Unit Vectors Define i j 1,0,0 0,1,0 k i k 0,0,1 0 j So tht n vector, v, c i j ck,

Cross Product (Vector product),,,, If Then k j i ) ( ) ( ) ( Rememer using determinnt k j i Note: is perpendiculr to nd

Cross Product Note: is perpendiculr to oth nd 0

Cross Product (Vector product) Clculte if = (3,0,) nd = (4,1,8) 3,0, 4,1,8 Using determinnt i j k 3 0 4 1 8 Then ( 0 ) i (4 8) j (3 0) k i 16j 3k

Norml for Tringle using Cross Product Method plne n (p - p 0 ) = 0 n p n = (p - p 0 ) (p 1 - p 0 ) normlie n n/ n p p 0 p 1 Note tht right-hnd rule determines outwrd fce

Newell Method for Norml Vectors Prolems with cross product method: clcultion difficult hnd, tedious If vectors lmost prllel, cross product is smll Numericl inccurc m result p 1 Proposed Mrtin Newell t Uth (tepot gu) Uses formule, suitle for computer Compute during mesh genertion Roust! p 0 p

Newell Method Emple Emple: Find norml of polgon with vertices P0 = (6,1,4), P1=(7,0,9) nd P = (1,1,) Using simple cross product: ((7,0,9)-(6,1,4)) X ((1,1,)-(6,1,4)) = (,-3,-5) P1 - P0 P - P0 P (1,1,) PO (6,1,4) P1 (7,0,9)

Newell Method for Norml Vectors Formule: Norml N = (m, m, m) m m m N 1 i0 N 1 i0 N 1 i0 i net( i) i net( i) i net( i) i net( i) i net( i) i net( i)

Newell Method for Norml Vectors Clculte component of norml m N 1 i0 i net( i) i net( i) P0 6 1 4 m m m (1)(13) ( 1)(11) (0)(6) 1311 0 P1 P P0 7 1 6 0 1 1 9 4

Newell Method for Norml Vectors Clculte component of norml m N 1 i0 i net( i) i net( i) P0 6 1 4 m m m ( 5)(13) (7)(8) ( )(7) 65 56 14 3 P1 P P0 7 1 6 0 1 1 9 4

Newell Method for Norml Vectors Clculte component of norml m m m m N 1 i0 i net( i) i net( i) ( 1)(1) (6)(1) ( 5)() 1 6 10 5 P0 P1 P P0 6 7 1 6 1 0 1 1 4 9 4 Note: Using Newell method ields sme result s Cross product method (,-3,-5)

Finding Vector Reflected From Surfce = originl vector n = norml vector r = reflected vector m = projection of long n e = projection of orthogonl to n n Note: Θ 1 = Θ e m r r e m m Θ 1 Θ -m r m e e

Forms of Eqution of Line Two-dimensionl forms of line Eplicit: = m +h Implicit: + +c =0 Prmetric: () = 0 + (1-) 1 () = 0 + (1-) 1 Prmetric form of line 1 - α More roust nd generl thn other forms Etends to curves nd surfces P o α P α P 1

Conveit An oject is conve iff for n two points in the oject ll points on the line segment etween these points re lso in the oject P P Q Q conve not conve

References Angel nd Shreiner, Interctive Computer Grphics, 6 th edition, Chpter 3 Hill nd Kelle, Computer Grphics using OpenGL, 3 rd edition, Sections 4. - 4.4