Affine Geometry Jehee Lee Seoul National University.

Slides:



Advertisements
Similar presentations
Computer Graphics - Geometry & Representation -
Advertisements

1 Seminar of computational geometry Lecture #1 Convexity.
TOPIC 3 INTRODUCTION TO OPENGL CGMB214: Introduction to Computer Graphics.
OpenGL (Graphics Library) Software Interface to graphics software Allows to create interactive programs that produce color images of moving 3D objects.
2/7/2001Hofstra University – CSC290B1 Review: Math (Ch 4)
CS5500 Computer Graphics March 22, Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Geometry Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Representation Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Transformations. 2 Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple geometry, most of us.
Representation CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)
Computer Graphics Lecture 10 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections.
Basic graphics. ReviewReview Viewing Process, Window and viewport, World, normalized and device coordinates Input and output primitives and their attributes.
Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)
Geometry CSC 2141 Introduction to Computer Graphics.
1 Geometry. 2 Objectives Introduce the elements of geometry ­Scalars ­Vectors ­Points Develop mathematical operations among them in a coordinate-free.
Jehee Lee Seoul National University
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Intro to 3D Models Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Graphics Programming using OpenGL. OpenGL is a software interface that allows the programmer to create 2D and 3D graphics images. This interface consists.
Transformations Jehee Lee Seoul National University.
OpenGl Graphics Programming. Introduction OpenGL is a low-level graphics library specification. It makes available to the programmer a small set of geomteric.
©College of Computer and Information Science, Northeastern University CS 4300 Computer Graphics Prof. Harriet Fell Fall 2012 Lecture 12 – October 1, 2012.
Output Primitives Jehee Lee Seoul National University.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Geometric Objects and Transformation
Representation. Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames for.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 52 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 52 Computer Graphics Three-Dimensional Graphics I.
VECTORS (Ch. 12) Vectors in the plane Definition: A vector v in the Cartesian plane is an ordered pair of real numbers:  a,b . We write v =  a,b  and.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Affine Transformations.
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
CA 302 Computer Graphics and Visual Programming Lecture 2: Introduction to OpenGL Aydın Öztürk
Chun-Yuan Lin Introduction to OpenGL 2015/12/19 1 CG.
Affine Geometry Jehee Lee Seoul National University.
Comparing Two Motions Jehee Lee Seoul National University.
1 Graphics CSCI 343, Fall 2015 Lecture 9 Geometric Objects.
Affine Geometry.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CSC461: Lecture 13 Coordinates Objectives Introduce concepts such as dimension and basis Introduce concepts such as dimension and basis Introduce coordinate.
1 Representation. 2 Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames.
III- 1 III 3D Transformation Homogeneous Coordinates The three dimensional point (x, y, z) is represented by the homogeneous coordinate (x, y, z, 1) In.
Computer Graphics I, Fall 2010 Geometry.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Geometric Transformations. Transformations Linear transformations Rigid transformations Affine transformations Projective transformations T Global reference.
Computer Graphics I, Fall 2010 Transformations.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Geometry.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
4. Affine transformations. Reading Required:  Watt, Section 1.1. Further reading:  Foley, et al, Chapter  David F. Rogers and J. Alan Adams,
COMPUTER GRAPHICS AND LINEAR ALGEBRA AN INTRODUCTION.
Unit-4 Geometric Objects and Transformations- I
Introduction to Computer Graphics with WebGL
Introduction to OpenGL (IDE: Eclipse)
Coordinate Change.
Representation Ed Angel Professor Emeritus of Computer Science,
Isaac Gang University of Mary Hardin-Baylor
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Isaac Gang University of Mary Hardin-Baylor
CSC461: Lecture 14 Representations
3D Transformation CS380: Computer Graphics Sung-Eui Yoon (윤성의)
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
1.3 Vector Equations.
Representation Ed Angel Professor Emeritus of Computer Science,
Transformations 2 University of British Columbia
Representation Ed Angel
Presentation transcript:

Affine Geometry Jehee Lee Seoul National University

Geometric Programming A way of handling geometric entities such as vectors, points, and transforms. Traditionally, computer graphics packages are implemented using homogeneous coordinates. We will review affine geometry and coordinate-invariant geometric programming. Because of historical reasons, it has been called “coordinate-free” geometric programming

Example of coordinate-dependence What is the “sum” of these two positions ? Point p Point q

If you assume coordinates, … The sum is (x 1 +x 2, y 1 +y 2 ) –Is it correct ? –Is it geometrically meaningful ? p = (x 1, y 1 ) q = (x 2, y 2 )

If you assume coordinates, … p = (x 1, y 1 ) q = (x 2, y 2 ) Origin (x 1 +x 2, y 1 +y 2 ) Vector sum –(x 1, y 1 ) and (x 2, y 2 ) are considered as vectors from the origin to p and q, respectively.

If you select a different origin, … p = (x 1, y 1 ) q = (x 2, y 2 ) Origin (x 1 +x 2, y 1 +y 2 ) If you choose a different coordinate frame, you will get a different result

Vector and Affine Spaces Vector space –Includes vectors and related operations –No points Affine space –Superset of vector space –Includes vectors, points, and related operations

Points and Vectors A point is a position specified with coordinate values. A vector is specified as the difference between two points. If an origin is specified, then a point can be represented by a vector from the origin. But, a point is still not a vector in coordinate-free concepts. Point p Point q vector (p-q)

Vector spaces A vector space consists of –Set of vectors, together with –Two operations: addition of vectors and multiplication of vectors by scalar numbers A linear combination of vectors is also a vector

Affine Spaces An affine space consists of –Set of points, an associated vector space, and –Two operations: the difference between two points and the addition of a vector to a point

Coordinate-Free Geometric Operations Addition Subtraction Scalar multiplication Linear combination Affine combination

Addition u v u + v p p + w u + v is a vectorp + w is a point w u, v, w : vectors p, q : points

Subtraction v u - v u q p u - v is a vectorp - q is a vector p - q p p - w p - w is a point -w u, v, w : vectors p, q : points

Scalar Multiplication scalar vector = vector 1 point = point 0 point = vector c point = (undefined) if (c≠0,1)

Linear Combination A linear space is spanned by a set of bases –Any point in the space can be represented as a linear combination of bases

Affine Combination

Example (p + q) / 2 : midpoint of line pq (p + q) / 3 : Can you find a geometric meaning ? (p + q + r) / 3 : center of gravity of ∆pqr (p/2 + q/2 – r) : a vector from r to the midpoint of q and p

Affine Frame A frame is defined as a set of vectors {v i | i=1, …, N } and a point o –Set of vectors {v i } are bases of the associate vector space –o is an origin of the frame –N is the dimension of the affine space –Any point p can be written as –Any vector v can be written as

Barycentric Coordinates Any point p can be written as Letting {q i | i=0,1,…,N} be –q 0 = o, and –q i = o + v i for i=1, …, N.

Summary

Matrix Representation Use an “extra” coordinate –In 3-dimensional spaces Point : (x, y, z, 1) Vector : (x, y, z, 0) For example (x 1, y 1, z 1, 1) + (x 2, y 2, z 2, 1) = (x 1 +x 2, y 1 +y 2, z 1 +z 2, 2) point pointundefined (x 1, y 1, z 1, 1) - (x 2, y 2, z 2, 1) = (x 1 -x 2, y 1 -y 2, z 1 -z 2, 0) point pointvector (x 1, y 1, z 1, 1) + (x 2, y 2, z 2, 0) = (x 1 +x 2, y 1 +y 2, z 1 +z 2, 1) pointvectorpoint

Projective Spaces Homogeneous coordinates –(x, y, z, w) = (x/w, y/w, z/w, 1) –Useful for handling perspective projection But, it is algebraically inconsistent !!

OpenGL Programming OpenGL ( gl ) is a common graphics library which provides functions for drawings and interactive input. OpenGL is accessible via C or C++ programs OpenGL basic (core) library –Functions, symbols, and types glBegin, glClear, glCopyPixels, glPolygonMode GL_2D, GL_RGB, GL_POLYGON Glbyte, Glshort, Glint, Glfloat, Gldouble

Related Libraries OpenGL Utility (GLU) –Setting up viewing and projection matrices –Complex objects Line and polygon approximations Displaying quadrics, B-splines –Prefix glu OpenGL Utility Toolkit (GLUT) –Support any screen-windowing system

An Example of Open GL Initialize OpenGL and GLUT Initialize a drawing window Draw a line segment