13
Computer Graphics Lecture 10 Fasih ur Rehman

Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Embed Size (px)

Citation preview

Page 1: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Computer Graphics

Lecture 10Fasih ur Rehman

Page 2: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Last Class

• Viewing– Perspectives– Projections

Page 3: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Today’s Agenda

• Geometric Objects– Vector Space– Affine Space

Page 4: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Scalars, Points and Vectors

• Geometry is a subject that relates objects in n – dimensional space (In computer graphics we deal with 3 dimensional space)

• Scalars, vectors and points form minimum set of primitives and are used to build sophisticated objects.

• A point is a location in space that neither has size nor shape.

• Real numbers (magnitudes) such as distance between two points are a scalars

• Vectors are also required to work with directions.

Page 5: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Scalars

• Scalars are members of sets which can be combined by addition and multiplication and obey associativity, commutivity and inverses axioms

• Scalars don’t possess any geometric properties• Real and Complex numbers

Page 6: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Vectors

• A quantity defined by magnitude and direction• Velocity, Force etc.• For computer graphics, a directed line segment

(can be used for any vector) is most significant example

Page 7: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Vector Operations

• Vectors have following properties• Inverses: Equal in magnitude but opposite in

direction• Scalar Multiplication: A vector can be multiplied

by a scalar (magnitude changes only not the direction)

• Zero vector is also defined with zero magnitude and undefined direction

• Head to Tail Rule is used to add vectors

Page 8: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Head to Tail Rule

Page 9: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Linear Vector Space Extensions

• Linear Vector Space may not have ways to measure a scalar quantity.

• A Euclidean space is an extension of a vector space that adds a measure of size or distance and allows us to define such things as the length of a line segment.

• An affine space is an extension of the vector space that includes an additional type of object: the point.– Operations between vectors and points are allowed

Page 10: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Example

Page 11: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Affine Space

• Combines point and vector space• Allows following operations

– Vector-vector addition– Scalar-vector multiplication– Point-vector addition– Scalar-scalar operations

Page 12: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

Summary

• Geometric Objects– Vector Space– Affine Space

Page 13: Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections

References

• Fundamentals of Computer Graphics Third Edition by Peter Shirley and Steve Marschner

• Interactive Computer Graphics, A Top-down Approach with OpenGL (Sixth Edition) by Edward Angel.