Docsity

Rasterization and Vector Graphics - Introduction to Computer Graphics - Lecture Slides, Slides of Computer Graphics

Partial preview of the text

Download Rasterization and Vector Graphics - Introduction to Computer Graphics - Lecture Slides and more Slides Computer Graphics in PDF only on Docsity!

Lecture 02:

Rasterization and Vector Graphics

Conceptual Framework for Interactive

Graphics

  • Graphics library/package is intermediary between application and display hardware (Graphics System)
  • Application program maps application objects to views (images) of those objects by calling on graphics library. Application model may contain lots of non-graphical data (e.g., non-geometric object properties)
  • User interaction results in modification of model and/or image
  • This hardware and software framework is more than 4 decades old but is still useful

Graphics System/ GPU Application Model/data base

Software Hardware

Application program

Graphics Library

Computer Graphics Paradigms

• Two Basic Paradigms

What’s the difference?

Sample-based Graphics

  • Images are made up for grid of discrete pixels, for 2D “picture

elements”

  • Pixels are point locations with associated sample values, usually of

light intensities/colors, transparency, and other control information

  • When we sample an image, we sample the point location along the

continuous signal and we cannot treat the pixels as little circles or

squares

Visualization of a mathematical pixel grid

LCD display

CRT beam illumination pattern

Can’t resolve adjacent pixels on CRT

1 pixel

light intensity

Sampling an Image

  • A color value is measured at every grid point and used to color corresponding grid square
  • Note: this poor sampling and image reconstruction method creates blocky image

3D scene

0 = white, 5 = gray, 10 = black

What’s the Advantage?

  • Once image is defined in terms of colors

at (x, y) locations on grid, can change

image easily by altering location or color

values

  • E.g., if we reverse our mapping above

and make 10 = white and 0 = black, the

image would look like this:

  • Pixel information from one image can

be copied and pasted into another,

replacing or combining with previously

stored pixels

Sample-based Graphics

  • Sample-based graphics: discrete samples

are used to describe visual information

  • pixels can be created by digitizing images, using a sample-based “painting” program, etc.
  • often some aspect of the physical world is sampled for visualization, e.g., temperature across the US
  • example programs: Adobe Photoshop™, GIMP™ , Adobe AfterEffects™

Graphics System/ Application^ GPU Model/data base

Software Hardware

Application program

Graphics Library

Geometry-based Graphics

• Geometry-based Graphics

  • Also known as (scalable) vector graphics,
  • Or object-oriented graphics

• Geometry is created along with various

appearance attributes, and is then sampled for

visualization (via rendering)

  • examples of 2D apps: Adobe Illustrator™, Adobe Freehand™, Corel CorelDRAW™
  • examples of 3D apps: Autodesk’s AutoCAD2010™, Autodesk’s (formerly Alias|Wavefront’s) Maya™, Autodesk’s) 3D Studio Max™

What is Geometric Modeling?

  • What is a model?
  • Captures salient features (data, behavior) of

thing/phenomenon being modeled

  • data includes geometry, appearance, attributes…
  • note similarity to OOP ideas
  • Real: some geometry inherent
  • physical (e.g., actual object such as a chair)
  • non-physical (e.g., mathematical function, weather data)
  • Abstract: no inherent geometry, but for visualization
  • organizational (e.g., company org. chart)
  • quantitative (e.g., graph of stock market)

Decomposition of a Geometric Model

  • Divide and Conquer
  • Hierarchy of geometrical

components

  • Reduction to primitives (e.g.,

spheres, cubes, etc.)

  • Simple vs. not-so-simple

elements (nail vs. screw)

decomposition

Head

Shaft

Point

composition

Geometric Modeling

Examples of 3D Primitives

Vector Architecture

  • Vector display works

with display list/file

stored in refresh buffer

  • Display controller draws

all vectors at < 60 Hz

(often at variable rate);

  • flicker is a problem

2D Raster Architecture

  • Raster display stores

bitmap/pixmap in refresh buffer, also known as bitmap, frame buffer; can be in separate hardware (VRAM) or in CPU’s main memory (DRAM)

  • Video controller draws all

scan‐lines at consistent > 60 Hz; separates update rate of the frame buffer and refresh rate of the CRT