chapter 1

1.0-1.1 What is computer graphics (CG)?

CG is concerned with all aspects of producing pictures or images using a computer.

How was this image produced (Color Plate 1)?


CG might be categorized into four broad areas?

Read section 1.1 on your own - simple classification of graphics uses and application types.


1.2 CG Hardware

A graphics system minimally consists of a

processor,
memory,
frame buffer,
output devices, and
input devices.
If we are fortunate the system also contains a high-speed graphics acceleration card that supports openGL or some other standard


1.2.1 Frame Buffer (refresh buffer, image buffer, raster)

The frame buffer stores the image to be displayed.
A frame buffer can be visualized as a matrix of picture elements (pixels) where each pixel is a 1X1 entry.
The frame buffer is stored in memory - in RAM if no special purpose memory is available or in VRAM (video RAM) or DRAM (dynamic RAM) - both for high-speed access.
A row of pixels in the buffer is a raster line or scanline.
The size of the buffer (640X480, 1024X1024, etc.) determines the resolution of the displayed image.
The depth of the buffer (number of bits per pixel) determines the number of colors that can be displayed.

Examples -

A 1-bit picture element can only display black/white images.
A 2-bit element can display shades of gray.
An 8-bit element can display 256 colors.
A True Color or RGB display contains 24 bits (8 each for red, green and blue) generating most colors visible to the human eye (16 million colors). An additional 8-bits may be available to support transparency.
Buffers currently range up to 96 bits per pixel. Bitmap really refers to one bit per pixel systems, pixmap to multi-bit systems, and frame buffer to the actual buffer memory.


1.2.2 CRT (cathode ray tube) Output Device

Prior to 1950's, simple hard copy devices such as line printers were available as graphic output displays.


A Brief History of CG

Computer Graphics: 1950-1960

Computer graphics goes back to the earliest days of computing.

Computer Graphics: 1960-1970

Wireframe graphics

Project Sketchpad

Display Processors

Direct View Storage tube

Computer Graphics: 1970-1980

Raster Graphics

Image produced as an array (the raster) of picture elements (pixels) in the frame buffer.

Allows us to go from lines and wire frame images to filled polygons.

Raster Mode: Polygons are scan converted to their pixel representation [The image is scanned sequentially from top to bottom and then back to the top again - or the scan can be interlaced (odd scan lines done first, followed by even scan lines - TV technology)].

Beginning of graphics standards

Workstations and PCs

Computer Graphics: 1980-1990

Realism comes to computer graphics

Smooth Shading
Environmental Mapping
Bump Mapping

Computer Graphics: 1990-2000

Computer Graphics: 2000-


1.3 Image Formation

What elements are necessary for image formation (i.e. photography)?

The process of combining the 3D specification of an object (object space) with the 3D specification of a viewer - (world space) - to produce a 2D image (screen or image space) is the essence of CG image formation.

cubeperspectivecube display

object space --> world space--> image space


1.3.2 Light and Images

An object is only visible if a light source is present.

Light from the source strikes the visible surfaces of an object and is reflected to the camera or the eye.

The interaction of light with the physical or material properties of the object determines the amount of light reflected back to the viewer.

Highly reflective objects such as mirrors reflect almost all light back to the viewer while matte objects (zinc, lead, wood) reflect little light back to the viewer.

Light is an electromagnetic radiation that travels in waves. The visible spectrum of electromagnetic radiation has wavelengths in the range 350-780 nm.

A light source has a color determined by the energy it emits at various wavelengths (blue-lower, green-middle, red-upper: in visible range).

In graphics we rarely deal with the physics of light as a wave - too computationally intensive, instead light is modeled via geometric optics:

This model views light sources as emitters of energy with a fixed intensity.

Light travels in straight lines from source to object.

Point light source (the sun) emits light equally in all directions.

A directional light source (light bulb) emits light over an area and more light in one direction than another.

A light source is characterized by its position, its color (intensity of various wavelengths), and its type: point or directional.


1.3.3 Modeling Light/Object Interaction - Ray Tracing

We can begin thinking about object/light source interaction as follows:

Rays A -F in the above diagram demonstrate some of the ways a light ray may interact with an object in the scene:

Ray Tracing is based on this model. This technique simulates complex physical effects at a computational cost. The ray tracing algorithm is covered later in the semester.

In practice, for real-time image formation, a more tractable model is needed. Such illumination models are discussed at length later in the semester.


1.4 Luminance and Color Images

Three-Color Theory

Human visual system has two types of sensors

Which is handled with

Additive and Subtractive Color


1.5 Pinhole Camera

A pinhole camera is a box with a small hole in one side and a film placed opposite the hole and inside the box. Assume the camera is oriented along the z-axis with the pinhole at the origin of our coordinate system. Only a single ray of light may enter the pinhole.

Here we see a ray originating from point (x, y, z) and striking the film of the camera at point (xp, yp, zp) a distance d from the origin. The film plane is thus at z = -d.

How do we calculate the projection of (x, y, z) to (xp, yp, zp)?

The field or angle of view of the camera is the angle made by the largest object the camera can image on its film plane. The pinhole camera has a very limited field of view.

A more sophisticated camera with a lens can collect more light and the focal length of the lens can allow an angle of view up to 180 degrees.

The ideal pinhole camera has an infinite depth of field (every point is in focus). Lenses on the other hand do not have an infinite depth of field.

For simplicity we assume an infinite depth of field for CG scenes. Later we will discuss techniques to determine whether objects are in focus or not.


1.6 Synthetic Camera Model (Camera basics)

In computer graphics, image generation is modeled on the process of image formation using an optical system - thus the term synthetic camera.

The specification of objects is independent of the viewer or camera.

The camera is given a position called the center of projection (COP) and a lens orientation. The camera's angle of view is specified.

The image is computed using calculations similar to those demonstrated in the pinhole camera example. This is done by moving the film plane of the camera in front of the camera lens. The moved film plane is called the projection or image plane. The image is projected onto the projection plane. Field of view is handled by placing a clipping rectangle around the projection plane so that objects outside the field of view are clipped from the scene.

Advantages

Global vs Local Lighting

Why not RayTracing?


1.7 Models and Architectures

Image Formation Revisited

Physical Approaches

The Programmer’s Interface

API Contents

Object Specification

Camera Specification

Lights and Materials

Following the Pipeline: Transformations

Clipping

Projection

Rasterization


Questions and Answers

1.

How was this image produced?

Preliminary Answer

2.

Four areas of CG

3.

Image formation

We live in a world of 3D objects - we think about the reference points on an object, distances between objects, etc. which are specified in some convenient coordinate system.

We use mathematics such as geometry and trig to measure size and distance.

We use physical devices such as cameras, microscopes, telescopes, and our eyes to understand spatial relationships between objects.

There is a fundamental link between the physics and mathematics of image formation in computer graphics.

Necessary elements

4.

Projection of point

Note the similar triangles created by (0, 0, 0), (0, 0, z), (0, y, z) and (0, 0, 0), (0, 0, -d), (0, yp, -d). Both are right triangles with equal angles at the origin.

Using the fact that the ratio of two legs of similar triangles are equal we note that

x/z = xp/-d and

y/z = yp/-d

Then solving for xp, yp we find

xp = -x/(z/d)

yp = -y/(z/d)

zp = -d

The point (xp, yp, -d) is a projection of the point (x, y, z) - discussed in depth later in the semester.