CS488 - Introduction to Computer Graphics - Lecture 21

Comments and Questions

  1. Exam: April 16th, 2008, 09.00, RCH???

Polyhedra and Meshes

What is a polyhedron?

  1. A set of vertices
  2. Connected by edges
  3. Which define faces

Ray Tracer format

  1. Array of points: three floating point numbers
  2. Array of edges: pair of pointers to vertices
  3. Array of faces: pointers to the vertices at the corners
  4. Build the arrays as you read the input.

Now let's think about modifying the mesh.

  1. Add a vertex, given its coordinates

    Is this vertex already in the data structure?

    Keep the vertices sorted by location

  2. Delete a vertex, including edges and faces

    Finding the edges and faces is not easy

    What about the hole in the vertex array?

  3. Add an edge, given two vertices

    Is the edge already in the data structure?

  4. Delete an edge, including possible faces and disconnected points.

    Are any faces affected?

  5. Split a face with a new vertex, given face, vertex

    Delete the old face

In summary we have,

  1. Each vertex has pointers to two edges
  2. Each vertex has pointers to n faces
  3. Each edge has pointers to two faces

Winged Edge Data Structure

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

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

Every time we see a graph we should think,

In the dual edges are primary:

Winged edge data structure

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?

Animation

Motion

Quite simple, really

`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.

Definition of `realistic' varies

  1. Between camera and actors

As type of actor changes: compare classic Disney animation to live action, which obeys Newtonian dynamics (and other constraints, too)

Spline Curves

Affine Combinations

  1. Line segments
  2. Quadratic segments
  3. Cubic segments
  4. etc

This process is called `blending' points.

If we call comb(n,i)u^(n-i) t^i the Bernstein polynomial, B(n, i; t, u), then

Joining Bezier curves

With C0 continuity

With C1 continuity

Weaker first order continuity G1

With C2 continuity

Interface

  1. Place P0, P1, P2, P3
  2. Q0, Q1, Q2 are determined, place Q3

etc.


Return to: