3D Computer Graphics - PowerPoint PPT Presentation

About This Presentation
Title:

3D Computer Graphics

Description:

3D Computer Graphics ... Vanhelsuwe New Riders Software Engineering and Computer Games Rucker Addison-Wesley Rotation about an arbitrary axis is performed by ... – PowerPoint PPT presentation

Number of Views:271
Avg rating:3.0/5.0
Slides: 35
Provided by: rein152
Category:

less

Transcript and Presenter's Notes

Title: 3D Computer Graphics


1
3D Computer Graphics
  • An oh so brief introduction

2
What you need to know
  • Theres really only a couple of things
  • Coordinate systems
  • Matrices
  • 3D ? 2D transformation

3
Homogeneous Coordinates
  • A computational convenience

4
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

5
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

6
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)
  • Thats really all you need to know about
    homogeneous coordinates

7
Matrix Operations
  • Uses of Matrix Multiplication

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

9
Scale
  • To scale a point (X, Y, Z) by sizes (x, y, z)

10
Rotate X
  • To rotate a point (X, Y, Z) about the X axis by
    an angle T

11
Rotate Y
  • To rotate a point (X, Y, Z) about the Y axis by
    an angle T

12
Rotate Z
  • To rotate a point (X, Y, Z) about the Z axis by
    an angle T

13
Shear X
  • To shear a point (X, Y, Z) int the X direction
    by an angle T

14
Shear Y
  • To shear a point (X, Y, Z) in the Y direction
    by an angle T

15
Shear Z
  • To shear a point (X, Y, Z) in the Z direction
    by an angle T

16
Combining matrices
17
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 dont
    rotate smoothly with constant velocity
  • These afflictions are due to the use of Euler
    angles and trigonometric functions that dont
    always behave well (sign changes at quadrant
    changes, asymptotic behavior)

18
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

19
3D ? 2D Transformation
20
Projections Orthographic
  • Projectors are perpendicular to the projection
    plane
  • Project plane is parallel to one of the principal
    faces

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

22
Projections Oblique
  • Projectors are arbitrary with respect to the
    projection plane

23
Projections Perspective
  • Projectors converge at the center of projection

24
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

25
Triangulation
  • Because you asked

26
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 (its dual) the Delaunay
    Triangulation

27
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

28
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

29
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

30
Delaunay, circles, Voronoi
31
Summary
  • This is all stuff that is fundamental to computer
    graphics (with the possible exception of
    triangulation thats computational geometry)
  • Typical 1 semester undergraduate course spends
    most of its time on these topics
  • Lots of good books on this material

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

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

34
Bibliography
  • Game Physics
  • Eberly
  • Morgan Kaufmann
  • Killer Game Programming in Java
  • Davison
  • OReilly
  • Developing Games in Java
  • Brackeen, Barker, Vanhelsuwe
  • New Riders
  • Software Engineering and Computer Games
  • Rucker
  • Addison-Wesley
Write a Comment
User Comments (0)
About PowerShow.com