1 / 54

CAP 4703 Computer Graphic Methods

CAP 4703 Computer Graphic Methods. Prof. Roy Levow Lecture 1. Computer Graphics. Broadly concerned with producing images by computer Many applications Still image generation and editing Animation and film, Computer games Design Scientific and medical data visualization

acacia
Download Presentation

CAP 4703 Computer Graphic Methods

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CAP 4703Computer Graphic Methods Prof. Roy Levow Lecture 1

  2. Computer Graphics • Broadly concerned with producing images by computer • Many applications • Still image generation and editing • Animation and film, Computer games • Design • Scientific and medical data visualization • Simulation and Virtual reality • Publishing, …

  3. Graphical System • Main Components • Processor • Memory • Frame Buffer • Output Devices • Input Devices

  4. Processor and Memory • Depending on the application, the system can range from • Capable personal computer to a • Super-computer

  5. Image Output • Images may be • Vector graphics • Formed by drawing lines to create image • Raster graphics • Composed of individual picture elements in an array or raster • Individual elements are pixels • Stored in a frame buffer • Raster graphics is most common • Vector graphics provides better scalability

  6. Graphic System Diragram

  7. Frame Buffer • Normally • Video RAM (VRAM) – designed to support fast transfer of large amounts of data • Dynamic RAM (DRAM) • Number of bits per pixel is the depth of the frame buffer • Determines number of distinct color values • B&W=1 • Full color >= 24

  8. Frame Buffer .2 • True color systems are also known as RGB • Number of bits per pixel is divided by 3 • Each group represents one of the colors • Red, Green, Blue • Resolution is the number of pixels per frame buffer • Usually reported as width x height

  9. Frame Buffer .3 • To reduce number of bits per pixel, a color buffer may be used • Color buffer holds actual RGB values • Frame buffer holds index into color buffer • Reduces size when number of colors used is small relative to total number possible

  10. Rasterization Example

  11. Grapihic Processor • Processing of graphic information may be done by • Normal CPU • Specialized Graphic Processor • High performance graphic display systems generally use separate graphic processor • Optimized for image processing and display • Specialized operations and high data throughput

  12. Output Devices • Previously, most common output device was the cathode-ray tube or CRT • Image is created by a moving electron beam that causes a coating on the tube face to glow • Most commonly CRT scans a line at a time across the screen • But may be random scan

  13. CRT Operation

  14. CRT • The image is not retained but must be refreshed (recreated) periodically • Most commonly at least 50 times per second • This is the refresh rate • Scan lines may be produced consecutively, non-interlaced • Or half at a time, interlaced

  15. Color CRT • Each screen pixel consists of three closely spaced color dots, a RGB triad • Shadow mask helps focus electron beam on a single dot

  16. Color CRT Image

  17. LCD Display • Each pixel is a layered solid state device that can be turned on or off to produce that color component • Generally cannot support as rapid refresh as CRT

  18. Input Devices • Keyboard • Pointing devices • Mouse • Joystick • Game console • Data tablet

  19. Images • Physical image is generated by physical object • Computer graphic systems generate synthetic image • Produced by program

  20. Objects and Viewers • World is populated with three dimensional objects • How object is seen depends on relationship to viewer and other attributes • Generally a viewer can see only some parts of an object • Different relationships between object and viewer can produce different images

  21. Views of an Object

  22. Camera System to Define Image

  23. Light • Without light all would be uniformly black • Light makes images visible and changes features through • Intensity • Color • Direction • Interaction with light is complex

  24. Camera withLight

  25. Light: Electromagnetic Radiation

  26. Light • Visible spectrum has wavelengths between 350 nm and 780 nm • Color depends on wavelength • Blue ~450 nm • Green ~520 nm • Red ~650 nm

  27. Modeling Light • Geometric Optics • Light assumed to come from point source • Fixed intensity • Travels in straight lines • Assume monochromatic (single color) • More complex sources can be viewed as collection of point sources

  28. Ray Tracing • Effect of light can be viewed by following ray from source to viewer • Light travels in straight line until it hits surface • Surface point then acts as new point source • Ray behavior determined by trig laws • Infinite possibilities but only those that reach viewer matter

  29. Ray Tracing

  30. Radiosity • When surface scatters incoming light in all directions, ray tracing does not produce accurate results • Energy conservation based calculation is more accurate but also more computationally intensive

  31. Human Visual System • Light enters eye through lens • Focused on retina at back of eye • Retina contains light sensitive cells • Rods – brightness only • Cones – three kinds for three colors • RGB cones allow RGB displays to function • Sensitivity is not uniform

  32. Sensitivity Curves

  33. Pinhole Camera • A simple model of a camera • Assumes light enters through a pin hole • Small enough that only one ray enters in any direction

  34. Pinhole Camera Image • Can calculate point where ray from point source is projected on back of camera yp = -y/(z/d), similar for x

  35. Pinhole Camera Image .2 • Point at back of camera is called the projection of the source • Field or angle of view is angle made by triangle from lens to image plane • Θ=2 arctan(h/2d)

  36. Imaging System

  37. Synthetic Camera Model • Standard approach for three-dimensional computer graphics • Compute image that would be captured by bellows camera • Bellows allows depth of camera to be changed as desired • Image is formed on projection plane, where back of camera would be

  38. Views of Image Formation

  39. Synthetic Camera Image

  40. Clipping Window or Rectangle • Determines the edge boundaries of the image

  41. Programmer’s Interface • Visual interface • Allows image creation by arranging visual components • Programming interface • Function library • Application Programmer’s Interface (API) • Defines available operations • Images build combining operations

  42. Paint Program Interface

  43. Pen-Plotter Model • Typical of early vector drawing systems • Move pen from point to point drawing lines to create image moveto(0, 0); lineto(1, 0); lineto(1, 1); lineto(0, 1); lineto(0, 0);

  44. Pen-Plotter Image • Adding additional lines could produce the image of a cube

  45. Pen-Plotter Model • Limited functionality • Difficult to produce three-dimensional images

  46. Three-Dimensional APIs • Synthetic Camera model is common • OpenGL • PHIGS • Direct3D • VRML • JAVA-3D

  47. 3-D API Components • Objects • Viewer • Light Sources • Material Properties

  48. Primitive Objects • Points • Line segments • Polygons • Text • Curves • Surfaces

  49. OpenGL Object Definition • List of components bounded by function calls • A triangle glBegin(GL_POLYGON); glVertex3f(0.0, 0.0, 0.0); glVertex3f(0.0, 1.0, 0.0); glVertex3f(0.0, 0.0, 1.0); glEnd();

  50. Camera or Viewer • Specification requires a number of attributes • Position • Orientation • Focal length • Film plane

More Related