Computer Graphics
Coms 385Fall 2003
Introduction
Lecture 1Wed, Aug 27, 2003
The Syllabus
Syllabus.html
Introduction
What are the goals of computer graphics? Realism Information Art
In this course, we will most often be concerned with realism.
Introduction
The main application areas of computer graphics. Scientific imaging. Computer games. Movies.
Introduction
What are the goals of this course? To learn the principles of computer
graphics. To learn the issues in computer
graphics. To apply these principles in programs
using the OpenGL graphics library.
Introduction
What are not the goals of this course? To learn OpenGL. To create complicated data
structures. To learn complicated mathematics.
Introduction
Nevertheless, we will Learn OpenGL. Create complicated data structures. Learn complicated mathematics.
But we will try to keep the second two to a minimum in your programs.
Introduction
What else are not the goals of this course? To use graphics packages to create graphics
(without programming). Adobe Photoshop. Maya.
We will learn to program the graphics.In other words, this is a programming course.
Computer Prerequisites
C++ programming (Coms 261)Data structures (Coms 262)
Mathematics Prerequisites
Some calculus, maybe.Some linear algebra. Vectors Matrices
We will introduce the necessary mathematics on a need-to-know basis.A high-school-level knowledge of these topics will probably be sufficient.
Programming Style
Rendering a scene can be computationally intensive.Yet, for satisfactory animation the scene must be rendered in less than 1/60 sec. (Why?)Therefore, we place a premium on program efficiency.
Programming Style
This permits us to do things that otherwise might be considered poor programming style.When deciding how to implement a function, we will choose the method that will execute the fastest, even if it is a bit more complicated or a bit less intuitive than other methods.
Programming Style
We will make generous use of global variables to reduce the number of function parameters passed.Consequences Most functions will return void. Most functions will have few, if any,
parameters. Functions will have “side effects.”
Programming Style
When creating C++ classes, we will often make data members public.Then we can access them directly without going through inspectors or mutators.
Programming Style
HOWEVER!Whenever we violate good programming guidelines, we should be able to justify it in terms of program efficiency.
Chapter 1
Introduction to Computer Graphics
Raster Displays
A raster display consists of a rectangular array of picture elements, called pixels.Each pixel emits a single color.The color of each pixel is stored in the framebuffer.The image rendered is the combined effect of these pixels.
Rasterized Lines
A rasterized line appears as a series of pixels in grid positions.This can produce “the jaggies.”
The Jaggies
For which lines are the jaggies most obvious?For which lines are the jaggies least obvious?Antialiasing reduces the effect of the jaggies.
Examples
HSC Display.cppFunctionPlotter.exe