Computer Graphics - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

Computer Graphics

Description:

Raster graphics CAN NOT be scaled to a higher resolution without ... GIMP - Open Source Alternative (Free) Adobe Illustrator. Vector based graphics program ... – PowerPoint PPT presentation

Number of Views:341
Avg rating:3.0/5.0
Slides: 35
Provided by: richard606
Category:

less

Transcript and Presenter's Notes

Title: Computer Graphics


1
Computer Graphics
  • Richard Kelley

2
Topics Covered
  • Common uses for CG
  • Types of CG
  • Vector vs. Raster
  • Programs
  • Photoshop, Maya, Renderman, illustrator
  • Ray tracing vs Scanline Algorithms
  • Graphics Libraries
  • OpenGL

3
Common uses for CG
  • CAD
  • CAM -Computer Aided Manufacturing
  • Virtual Reality
  • Data Visualizations
  • Scientific, Engineering, Medical
  • Visualization of functions
  • Medical Simulations
  • Computer Art

4
Common uses (cont)
  • Entertainment
  • Movies
  • Image Processing
  • GUI

5
Types of CG
  • Raster Graphics
  • Vector Graphics

6
Raster Graphics
  • Most common form
  • Bitmap
  • Rectangular grid of pixels
  • Each pixel is individually defined
  • Generally in RGB color space
  • Resolution defined by how many pixels are
    contained in the image
  • Raster graphics CAN NOT be scaled to a higher
    resolution without loss in quality

7
Raster Graphics (cont)
Resample from 100x100 to 200x200
8
Note on Displays
  • Virtually all modern video displays represent
    images in raster format
  • Scans the screen displaying the color of each
    pixel
  • Repaints the screen about 30 times a second
  • Why
  • Simplicity
  • Easy to implement
  • Cost effective

9
Vector Graphics(Geometric Modeling)
  • Uses geometric primitives to represent images
  • points,
  • Lines
  • Curves
  • Polygons
  • Today vector graphics are used more in
    high-resolution line art and 2D graphics
  • Almost all 3D rendering is done using a special
    subste of 2D graphics (including of a third point)

10
Vector Graphics (cont)
  • Suppose we wanted to display a circle in vector
    format.
  • All we have to do is gather the parameters we
    want and plug them into the equation for a circle
  • Radius r
  • Location of the center j,k
  • Stroke style
  • Fill style (possibly empty)

11
Vector Graphics (cont)
  • Vector Displays - not that common
  • Instead of displaying each pixel an electron beam
    is steered on the screen to trace out shapes
    leaving the rest of the screen black
  • Process is repeated many times per second to get
    a flicker free image
  • Dont confuse vector displays with the vector
    graphic format

12
Vector Graphics (cont)
  • VG store information (parameters) about the
    shapes contained in the images, and apply
    equations to reconstruct the them
  • So why use vector graphic?
  • Lets look at raster and vector side by side

13
Vector Graphics (cont)
Vector
Bitmap
14
Vector Graphics (cont)
  • So this means that vector graphics can be resized
    without loss of quality!
  • Advantages over Raster graphics
  • Minimal amount of information translates to
    smaller file size
  • Can zoom in and still have smooth lines
  • Parameters are stored and can be changed
  • Really any affine transform can be applied easily
  • Rotation
  • Skew

15
Programs Used
  • There are many graphics programs to choose from
    depending on your needs (and how much money you
    have)
  • Photoshop
  • GIMP
  • Adobe Illustrator
  • Maya
  • 3D Studio Max

16
Adobe Photoshop
  • Bitmap graphics editor
  • Initially created to edit scanned images
  • Because of its capabilities it has quickly
    dominated the market
  • Powerful because of its layering system and
    filters
  • Disadvantage costly! 650
  • GIMP - Open Source Alternative (Free)

17
Adobe Illustrator
  • Vector based graphics program
  • Power lies in its use of Bézier curves

18
Maya
  • 3D modeling and animation studio
  • Extremely powerful (and expensive)
  • Used in many movies
  • Full version 2000
  • Personal Learning Edition (free)
  • You better have some serious RAM

19
3D Studio Max
  • 3D modeling and animation studio
  • Similar to Maya
  • Used mostly by game developers because of its
    integrated character studio, but also used in
    movies and TV
  • 3495

20
Ray Tracing
  • Basic principal
  • A ray is traced backwards from the eye through a
    pixel in the image plane
  • Sometimes the ray misses all the objects
  • Sometimes it hits something
  • When this happens the object has to be evaluated
    to determine how the ray should react and
    otherwise be displayed

21
Ray Tracing (cont)
  • If the ray hits a shadow
  • A secondary ray (shadow ray) is shot backwards
    towards the light source
  • If the shadow ray hits another object before it
    hits a light source, then the first intersection
    is in the shadow of the second object
  • If the ray hits a reflective object
  • A secondary ray is bounced off the object and
    everything that ray hits will be displayed as a
    reflection on that object

22
Ray Tracing (cont)
  • If the ray hits on object that is transparent
  • A secondary ray is sent out and everything that
    it hits is displayed on the object
  • Heres an example to help clear things up

23
  • Example of some of the cool things you can do
    with ray tracing techniques

24
Scan line Algorithms
  • A method of rendering 3D graphics on a
    point-by-point basis rather than
    polygon-by-polygon basis
  • So some point on a line is calculated, followed
    by each successive points in the line
  • After one line is finished the algorithm moves on
    to the next line

25
(No Transcript)
26
Scan line (cont)
  • The advantage of scan line rendering is that is
    not necessary to translate the coordinates of all
    vertices from main memory into working memory
    each time a new polygon is encountered
  • Its quicker to access the cache than HD
  • Scan line rendering is used by most modern
    graphics cards
  • Can be accessed by programmers through an API
    such OpenGL

27
Graphics Libraries
  • What is a GL anyway?
  • Basically just a set of function calls to add
    features not normally available
  • Types
  • OpenGL
  • Java 2D, 3D
  • Direct3D
  • Renderman
  • How do they work?
  • Binding

28
OpenGL
  • First developed by Silicon Graphics as a platform
    independent graphics API
  • Provide routines to easily build high-level
    rendering and modeling
  • Didnt work though without hardware support
  • Needed the right graphics card etc.
  • Eventually became so popular that it was
    developed into a platform independent package
  • Today the package it maintained by OpenGL
    Architecture Review Board

29
OpenGL (cont)
  • OpenGL is mostly used for 3D graphics but can be
    used for 2D just by zeroing out the z-variable
  • Internally
  • A collection of hundreds of functions to provide
    direct access to your graphics card
  • Can control
  • Current color
  • Lighting
  • Blending
  • etc

30
OpenGL (cont)
  • Code example
  • http//www.opengl.org/resources/code/basics/redboo
    k/aaindex.c
  • Result

Click Me
31
Other Libraries
  • Java 2D, 3D
  • Direct3D
  • Subset of DirectX
  • DirectX controls other things besides graphics
    such sound
  • Renderman
  • Developed by Pixar for their movie
  • Toy Story, Monsters Inc, Finding Nemo
  • Included in Matlab, Mathematica, and Maple
  • To display 2D, 3D models of functions

32
Summary
  • Common uses for CG
  • Types of CG
  • Vector vs. Raster
  • Programs
  • Photoshop, Maya, Renderman, illustrator
  • Ray tracing vs Scanline Algorithms
  • Graphics Libraries
  • OpenGL

33
Sources
  • OpenGL Programming Guide. http//www.opengl.org/
    resources/code/basics/redbook/. March 6 2005
  • Raster Graphics. http//en.wikipedia.org/wiki/Ra
    ster_graphics. March 6 2005
  • Vector Graphics. http//en.wikipedia.org/wiki/Ve
    ctor_graphics. March 6 2005
  • Bezier Curves. http//en.wikipedia.org/wiki/Bezi
    er_curves. March 6 2005

34
More Sources
  • Litt, J. Vector vs Bitmap Graphics.
    http//graphicdesign.about.com/library/weekly/aa04
    2398.html. March 6 2004
  • Hearn D. Baker P. Computer Graphics with
    OpenGL. New York, 2003
Write a Comment
User Comments (0)
About PowerShow.com