COS 397 Computer Graphics. Svetla Boytcheva AUBG, Spring 2013. Lecture 2 Ray Tracing & Transformations. Outline. Points and Vectors Matrices Vector Operations Ray Tracing Homogenous coordinates Affine Transformations Translation Rotation Scaling Projection View Point
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
Outline • Points and Vectors • Matrices • Vector Operations • Ray Tracing • Homogenous coordinates • Affine Transformations • Translation • Rotation • Scaling • Projection • View Point • Coordinates of objects on the surface of other objects
Examples • Addition of p(5,2,3) andq(-1,-1,1) • Subtraction of q(-1,-1,1) and r(4,1,4)
Product • Various product operations • Product with scalar (i.e. vector and number) • Scalar product of vectors • Vector product of vectors • Three of them are used in Computer Graphics for important operations
Product with scalar • Product with number • Geometrical meaning • Scaling (extending, shortening) vector • Preserves the direction for k>0 • Reverses direction when k<0 (the opposite direction)
Scalar Product • Product of two vectors, the result is scalar (number) • Angle between two vectors • Geometrical/Graphical meaning • Checking for perpendicularity • Lightening of surface • Calculating the area
Examples (2,2,0).(0,1,0) • Lucky method • Lying in the same plane • Angle between = 45о • First class method • "First class" in terms of quality • but also because it may be applied by first grader student
Example • Check whether the vectors are perpendicular • p(4,0,1)and q(-2,3,8) • Solution
Vector product • Vector product and the result is vector • Anglebetween two vectors • Geometrical meaning • Finding normal vectors • Parallelogram Area
V1 V2 V2 u V1 Where vector points on? • The Result vector of Vector product is: • Perpendicular to the plane defined by to vector in this product • Lies in the plane where the direction of rotation from the first to the second vector is positive (i. e. counterclockwise)
How to remember? • Use right hand • Coordinate system PQRis right-hand Снимка: FreeDigitalPhotos.net
Unit Vectors X X + - + - Z Z Y Y ey ey ex ex ez ez + -
V1 V2 V2 u V1 Vector Product Cross Product, Outer Product • Definition • For Cartesian Reference Frame • Properties • AntiCommutative • Not Associative • Distributive
Scalar Product Vector Product Examples (x2,y2) V2 (x1,y1) V1 (x0,y0) Angle between Two Edges Normal Vector of the Plane
Determinant of Matrix • Definition • For a square matrix, combining the matrix elements to product a single number • 2 2 matrix • Determinant of nn Matrix A (n 2)
Inverse Matrix • Definition • Non-singular matrix • If and only if the determinant of the matrix is non-zero • 2 2 matrix • Properties
Geometric Transformation • Definition • Translation, Rotation, Scaling • Motivation – Why do we need geometric transformations in CG? • As a viewing aid • As a modeling tool • As an image manipulation tool