CS 184: COMPUTER GRAPHICS
Lecture #2 -- Mo: 1/25, 1999.
PREVIOUS
< - - - - > CS
184 HOME < - - - - > CURRENT
< - - - - > NEXT
Preparation:
Read Ch 1, Ch 4.2, 4.3.1; skim Ch 14.1-14.6
Lecture Topics
Brief Review of Last Lecture
Trends in Computer Graphics over the Last Three Decades.
Technical Course Contents: Three
main themes.
Calligraphic
Devices and Raster
Devices.
Drawing/Painting on Computer Graphics Devices
How to draw a line on a vector graphics device
How to draw/paint on a raster device
Foil: How to draw a banana or a thin line ?
Foil: Which
PIXELS should be turned on ?
Skim: Ch3.2 "Scan Converting Lines"
Bresenham algorithm to turn on "the right" pixels efficiently.
Standard Line-Drawing Abstraction
Pre-coded routines to do the low-level work for you:
Moveto(pt),
Lineto(Pt),
Begin Poly-Line -- Pt -- Pt -- Pt -- ... -- Pt -- End Poly-Line.
You will use such routines in your first programming assignment.
Basic interactive graphics - - First homework assignment.
ASG #1: How to draw lines interactively on a raster device.
Due Saturday before Midnight of this week.
Here is a quick, high-level intro:
You will be using a standard mouse to define vertices on the
screen,
which then get automatically connected by straight line segments.
With proper software support, a mouse is a very versatile device
and can be used for pointing, drawing, flying through virtual space,
controlling the view of the scene, modifying objects.
You will use a mouse for all of these applications.
Details will be discussed in the Discussion Sections today.
Interaction Devices
Mouse is not the only interaction device. There are many others. To get
an idea:
Read: Ch 8.1 "Interaction Hardware" + 8.2.1 "Basic Interaction
Tasks"
These are some of the devices that you should pay particular attention
to:
Keyboard, Lightpen, Tablet, Mouse, Trackball, Joystick, SpaceBall,
Data Glove, ...
All these devices need to be supported with proper software. ASG#1 is
a first small example
Object Representation in CG
In general you would like to keep the objects that you have created
(e.g., your fish-like polygonof ASG#1).
How can you do that ? Core dump from memory ? Printing out all data
structures ?
A terse minimal set of information that will permit to recreate the
polygon ?
It would be great if somebody else also could read your data and draw
your polygon ...
==> We need a standard polygon interchange format !
That also goes for the more complicated objects that you will create
later in the course.
For this course we have created our own simple format to define objects
and scenes:
==> "SLIDE".
"SLIDE" : Scene Language for Interactive Dynamic Environments
FULL SLIDE DEFINITION
is posted on the WEB.
[NOTE: The language used to be called GLIDE: "Graphics Language ...
",
but we had to change it, since 3DFX has taken the trademark on "Glide"
for their low level API for video game graphics.]
Reason why we give out language early:
See the "grand" picture; know target of your system-building efforts.
Basic concepts in language:
compact, yet readable and editable format;
easy to parse, and extensible syntax;
geometry contained in vertex coordinates, instance placements;
topology information explicitly captured in connectivity between vertices
and faces;
This is called a "boundary representation" or B-rep for
short,
(we omit discussion of hierarchy and time dependence for today).
All you need to know of SLIDE for ASG#1 are the constructs:
point,
face, object.
This B-rep can easily be extended to 3-dimensional objects.
New Homework Assignment:
ASG#1: "Fantasy Fish -- Interactive Polygon Builder"
DUE: Monday 2/1/99, 1159pm.
--> Next
Lecture
<-- Up to CS
184 HomePage
Page Editor: Carlo H. Séquin