# CS488 - Introduction to Computer Graphics - Lecture 34

## Review

1. Particle systems
2. Procedural terrain generation
3. Meshes
4. A5 Documentation
5. Evaluation

## Polyhedra and Meshes

#### Winged Edge Data Structure

When we talk about polyhedra & meshes it seems most natural to talk about vertices

• edges are vertex pairs,
• faces are vertex n-tuples n>2.

And we have been most interested in vertices and faces. Meshes are, of course, graphs

• not just any graphs but ones that obey constraints
• for every constraint there is an invariant
• complete sets of invariants are not known: not for lack of trying to find them

Every time we see a graph we should think,

In the dual edges are primary:

• vertices are where edges meet,
• faces are minimal closed paths

Winged edge data structure

• Where does the name come from?

Each edge has

1. pointers to the faces it separates
2. pointers to the vertices at its ends
3. participates in a doubly linked list of edges at each of its ends

Each vertx has

1. one pointer to an edge
2. Exercise. Why do you only need one?

Each face has

1. one pointer to an edge
2. Exercise. Why do you only need one?

Issues to consider

1. Traversal. Can you find all neighbours quickly?
2. Vertex/edge addition. Can you do it in constant time?
3. Vertex/edge deletion. Can you do it in constant time?

## Splines without Tears

The French curve.

• What am I doing with it?
• Making piece-wise curves

General piece-wise curves

1. They are just line segments: you have been making them all along.

When you put them in a mesh there is an extra requirement

• They must join at the ends: end of one must be the start of the next
• This is continuity.

But it doesn't explain why I used a French curve. Why?

Linear curves necessarily give derivative discontinuities (called C1 continuity)

• To get rid of them you need higher order curves.
• Actually third order ones.
• How does this do it?

Is it good enough to get me away from the French curve?

• Probably

Now you have a way of making smooth-enough curves specified by a small number of points.

• Why is it important to have them available?

## Animation

Quite simple, really

• Parameters of the model are functions of time.
• parameters of moving objects
• parameters of camera, including things like depth of field
• The modeller must specify these functions.
• Constraints.
• The functions must be physically `realistic'.
• The functions must be easily specifiable.

`Specifiable': Think splines.

`Realistic': Think continuity.

1. C0 continuity: no teleportation, possible discontinuities in velocity, which violate Newtonian mechanics.
2. C1 continuity: no discontinuities in velocity, possible infinite accelarations.
3. C2 continuitiy: acceleration continuous, possible infinite jerks.
4. etc.

Most impotant point

• Definition of `realistic' varies
1. Between camera and actors
2. As type of actor changes: compare classic Disney animation to live action, which obeys Newtonian dynamics (and other constraints, too)