Midterm Review - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Midterm Review

Description:

... along with properties of the lens and cornea determine our visual resolution ... Specify objects, lights, camera, attributes. Let implementation determine image ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 22
Provided by: LeeMcC
Category:
Tags: midterm | review

less

Transcript and Presenter's Notes

Title: Midterm Review


1
Midterm Review
2
Examples of Graphics
Icons and Symbols
Charts and Graphs
3
More Examples
Photographs
Rendered Images
4
More Examples
Scientific Visualization
5
More Examples
6
How? On Computer
  • Set up virtual camera
  • Set up virtual world
  • Adjust virtual lighting
  • Render image
  • Display the image

7
Rendering
  • Almost all modern graphics devices are raster
    devices, meaning that the graphics surface
    (screen, page, etc) is divided into a discrete
    grid of cells called pixels
  • The job of the graphics programmer is to select
    which pixels to fill in with what colors

8
The Frame Buffer
  • Is an array the raster that holds graphics
    related information
  • Mostly, it holds pixels
  • Converting geometric entities to pixel
    information is called rasterization
  • Each pixel in a picture requires color data
  • The number of bits used is called its depth
  • The depth determines how many different colors an
    image can have

9
Color Pallet
  • Non-true color images store the color values in
    pallets
  • Pallets are an array of colors stored, usually,
    at the beginning of an image file
  • The color information of a particular pixel is
    stored as an index reference to the pallet

10
True Color
  • 24-bit images
  • use 3, 8-bit segments to encode the three
    primaries
  • Red, green, and blue (RGB)
  • Each 8-bit segment can, therefore, hold 256
    shades of that color
  • This results in a possible 16,777,216 different
    colors

11
The human visual system
  • The sizes of the rods and cones along with
    properties of the lens and cornea determine our
    visual resolution
  • Resolution is the measure of how close we can
    place two points and still recognize that there
    are two distinct points

12
Object Specification
  • Most APIs support a limited set of primitives
    including
  • Points (1D object)
  • Line segments (2D objects)
  • Polygons (3D objects)
  • Some curves and surfaces
  • Quadrics
  • Parametric polynomials
  • All are defined through locations in space or
    vertices

13
Synthetic Camera Model
projector
p
image plane
projection of p
center of projection
14
Advantages
  • Separation of objects, viewer, light sources
  • Two-dimensional graphics is a special case of
    three-dimensional graphics
  • Leads to simple software API
  • Specify objects, lights, camera, attributes
  • Let implementation determine image
  • Leads to fast hardware implementation

15
Clipping
  • Just as a real camera cannot see the whole
    world, the virtual camera can only see part of
    the world space
  • Objects that are not within this volume are said
    to be clipped out of the scene

16
OpenGL Functions
  • Primitives
  • Points
  • Line Segments
  • Polygons
  • Attributes
  • Transformations
  • Viewing
  • Modeling
  • Control
  • Input (GLUT)

17
OpenGL State
  • OpenGL is a state machine
  • OpenGL functions are of two types
  • Primitive generating
  • Can cause output if primitive is visible
  • How vertices are processed and appearance of
    primitive are controlled by the state
  • State changing
  • Transformation functions
  • Attribute functions

18
OpenGL Primitives
GL_POINTS
GL_POLYGON
GL_LINE_STRIP
GL_LINES
GL_LINE_LOOP
GL_TRIANGLES
GL_QUAD_STRIP
GL_TRIANGLE_FAN
GL_TRIANGLE_STRIP
19
Polygon Issues
  • OpenGL will only display polygons correctly that
    are
  • Simple edges cannot cross
  • Convex All points on line segment between two
    points in a polygon are also in the polygon
  • Flat all vertices are in the same plane
  • User program must check if above true
  • Triangles satisfy all conditions

nonconvex polygon
nonsimple polygon
20
RGB color
  • Each color component is stored separately in the
    frame buffer
  • Usually 8 bits per component in buffer
  • Note in glColor3f the color values range from 0.0
    (none) to 1.0 (all), while in glColor3ub the
    values range from 0 to 255

21
Indexed Color
  • Colors are indices into tables of RGB values
  • Requires less memory
  • indices usually 8 bits
  • not as important now
  • Memory inexpensive
  • Need more colors for shading
Write a Comment
User Comments (0)
About PowerShow.com