2D and 3D Transformations, Homogeneous Coordinates Lecture 03 Patrick Karlsson
[email protected] Centre for Image Analysis Uppsala University Computer Graphics November 6 2006 Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 1 / 23 Reading Instructions Chapters 4.1–4.9. Edward Angel. “Interactive Computer Graphics: A Top-down Approach with OpenGL”, Fourth Edition, Addison-Wesley, 2004. Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 2 / 23 Todays lecture ... in the pipeline Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 3 / 23 Scalars, points, and vectors Scalars α, β Real (or complex) numbers. Points P, Q Locations in space (but no size or shape). Vectors u, v Directions in space (magnitude but no position). Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 4 / 23 Mathematical spaces Scalar field A set of scalars obeying certain properties. New scalars can be formed through addition and multiplication. (Linear) Vector space Made up of scalars and vectors. New vectors can be created through scalar-vector multiplication, and vector-vector addition. Affine space An extended vector space that include points. This gives us additional operators, such as vector-point addition, and point-point subtraction. Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 5 / 23 Data types Polygon based objects Objects are described using polygons. A polygon is defined by its vertices (i.e., points). Transformations manipulate the vertices, thus manipulates the objects. Some examples in 2D Scalar α 1 float. Point P(x, y) 2 floats. Vector v(x, y) 2 floats. Matrix M 4 floats.