3D Computer Graphics An oh so brief introduction.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Affine Transformations
Transformations Ed Angel Professor Emeritus of Computer Science
Three Dimensional Viewing
Shared Graphics Skills Cameras and Clipping Planes
Camera calibration and epipolar geometry
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
CS5500 Computer Graphics March 22, Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple.
3D Coordinate Systems and Transformations Revision 1
3-D Geometry.
3D orientation.
CSCE 689: Computer Animation Rotation Representation and Interpolation
CSCE 441: Computer Graphics Rotation Representation and Interpolation
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Midterm Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2004.
Transformations. 2 Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple geometry, most of us.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)
10/5/04© University of Wisconsin, CS559 Fall 2004 Last Time Compositing Painterly Rendering Intro to 3D Graphics Homework 3 due Oct 12 in class.
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
Visualizing Orientation using Quaternions Gideon Ariel; Rudolf Buijs; Ann Penny; Sun Chung.
Game Physics – Part IV Moving to 3D
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.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Transformation & Projection Feng Yu Proseminar Computer Graphics :
Intro to 3D Models Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Advanced Computer Graphics Spring 2014
1 Fundamentals of Robotics Linking perception to action 2. Motion of Rigid Bodies 南台科技大學電機工程系謝銘原.
Geometric Objects and Transformation
10/3/02 (c) 2002 University of Wisconsin, CS 559 Last Time 2D Coordinate systems and transformations.
Geometrical Transformations 2 Adapted from Fundamentals of Interactive Computer Graphics, Foley and van Dam, pp , by Geb Thomas.
CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann.
Mark Nelson 3d projections Fall 2013
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 17, 2015 TRANSFORMATIONS AFFINE TRANSFORMATIONS QUATERNIONS.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Affine Geometry.
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 Transformations.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Computer Graphics Projections.
Perspective projection
Computer Animation Algorithms and Techniques
CPSC 641: Computer Graphics Rotation Representation and Interpolation
CS 445 / 645 Introduction to Computer Graphics
Computer Graphics CC416 Week 15 3D Graphics.
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 TRANSFORMATIONS
Projection Our 3-D scenes are all specified in 3-D world coordinates
3D Transformations Source & Courtesy: University of Wisconsin,
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
Mobile Robot Kinematics
Three Dimensional Viewing
(c) University of Wisconsin, CS559
UMBC Graphics for Games
3D Graphics.
Geometric Objects and Transformations (II)
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Presentation transcript:

3D Computer Graphics An oh so brief introduction

What you need to know… There’s really only a couple of things –Coordinate systems –Matrices –3D → 2D transformation

Homogeneous Coordinates A computational convenience

Coordinate systems To represent a location (point) in 3D space one needs 3 numbers (X, Y, Z) Each value specifies a distance along the respective coordinate axis The resultant location (point) is the sum of the axis unit vectors multiplied by the values

Manipulating points As we will see soon, manipulations of points in 3 space are generally performed using matrix notation But, as it turns out, this is not readily done using points represented by 3 values Something better is needed…

Homogeneous coordinates Homogeneous coordinates were introduced as a means of facilitating matrix-based transformations applied to points It is a 4D representation of a 3D point (X, Y, Z) → (X, Y, Z, 1.0) (X/W, Y/W, Z/W) → (X, Y, Z, W) That’s really all you need to know about homogeneous coordinates

Matrix Operations Uses of Matrix Multiplication

Translation To move a point (X, Y, Z) by amounts (x, y, z):

Scale To “scale” a point (X, Y, Z) by sizes (x, y, z):

Rotate X To “rotate” a point (X, Y, Z) about the X axis by an angle Θ:

Rotate Y To “rotate” a point (X, Y, Z) about the Y axis by an angle Θ:

Rotate Z To “rotate” a point (X, Y, Z) about the Z axis by an angle Θ:

Shear X To “shear” a point (X, Y, Z) int the X direction by an angle Θ:

Shear Y To “shear” a point (X, Y, Z) in the Y direction by an angle Θ:

Shear Z To “shear” a point (X, Y, Z) in the Z direction by an angle Θ:

Combining matrices Translate to origin Rotate Θ about X Rotate Θ about YRotate Θ about Z Rotate -Θ about Y Rotate -Θ about X Translate to point

Problems Rotation based on matrix operations [potentially] suffers some afflictions –Difficult to interpolate between rotations when you want to create a smooth sequence –Gimbal lock – when one of the three axes rotates to align with another essentially rendering it redundant (reduces the number of degrees of freedom) –Non-linear speed of rotation – objects don’t rotate smoothly with constant velocity These afflictions are due to the use of Euler angles and trigonometric functions that don’t always behave well (sign changes at quadrant changes, asymptotic behavior)

Quaterions Another method for performing rotations Based on complex arithmetic (complex numbers – not complicated numbers) Straight forward conversion from Euler (matrix based) operations to Quaternions The underlying concepts are nasty The implementation is easy –Just a bunch of multiplications and additions Handles the constant velocity rotation issue –SLERP (Spherical LinEaR interPolation) –Ken Shoemake is credited for coming up with the approach

3D → 2D Transformation

Projections – Orthographic Projectors are perpendicular to the projection plane Project plane is parallel to one of the principal faces

Projections – Axonometric Projectors are perpendicular to the projection plane Project plane has any desired orientation with respect to the object faces

Projections – Oblique Projectors are arbitrary with respect to the projection plane

Projections – Perspective Projectors converge at the center of projection

Projections Each has advantages and disadvantages dealing with –Retention of angles between lines –Retention of distances between points –Visibility of surfaces –Realization via camera models –Realistic synthesis of scenes

Triangulation Because you asked

Triangulation Problem: given a set of points, find a set of triangles that connects those points in a mesh Solution: computational geometry provides us with the Voronoi Diagram and (it’s dual) the Delaunay Triangulation

Delaunay Triangulation For a given set of points –Find a set of edges satisfying an "empty circle" property: –for each edge we can find a circle containing the edge's endpoints but not containing any other points –Deals with

Voronoi Diagram For a given set of points –Every point in the region around a point is closer to that point than to any of the other point

Inscribe and Circumscribe Inscribe –Given a triangle find a circle that fits inside it Circumscribe –Given a triangle find a circle that passes through all three vertices triangle inscribe circumscribe

Delaunay, circles, Voronoi

Summary This is all stuff that is fundamental to computer graphics (with the possible exception of triangulation – that’s computational geometry) –Typical 1 semester undergraduate course spends most of it’s time on these topics –Lots of good books on this material

Bibliography Interactive Computer Graphics 4 th edition –Angel –Addison-Wesley Computer Graphics Principles and Practice 2 nd edition –Foley, van Dam, Feiner, Hughes –Addison-Wesley Java 2D Graphics –Knudsen –O’Reilly Computer Graphics for Java Programmers –Ammeraal –Wiley

Bibliography Essential Mathematics for Games & Interactive Applications –van Verth, Bishop –Morgan Kaufmann Visualizing Quaternions –Hanson –Morgan Kaufmann 3D Game Engine Design –Eberly –Morgan Kaufmann

Bibliography Game Physics –Eberly –Morgan Kaufmann Killer Game Programming in Java –Davison –O’Reilly Developing Games in Java –Brackeen, Barker, Vanhelsuwe –New Riders Software Engineering and Computer Games –Rucker –Addison-Wesley