CS488 - Introduction to Computer Graphics - Lecture 33

Comments and Questions


  1. Human skin
  2. Mown grass
  3. Return preliminary proposal


Particle Systems

What are they?

  1. Collections of particles that taken together represent something
  2. Each particle has
    1. an initial state
      • position
      • velocity
      • size
      • colour and/or luminosity
      • etc
    2. an update function
      • changes the state
      • can have random perturbations
  3. Dynamics has

How to use them for animation.

  1. Something starts emitting particles at time t0
  2. At each subsequent time step
    1. Existing particles are updated
    2. Dead particles are removed
    3. New particles are created
    4. All particles are rendered.
  3. Until it stops emitting particles at t1.

How to use them for visualization.

  1. Example. For visualizing motion in a fluid
    1. Add particles upstream
    2. Let them be carried by the fluid
    3. Until the fluid flows out of the scene.

How to use them for ray-tracing.

Two ways

  1. Let the particle system get into a steady state, then freeze and put into the scene.
  2. Accumulate the path of each particle, then use it as the shape of a linear primitive

Fractal Terrain Generation

What is it?

How is it done?

  1. Start with a polygon covering the terrain
  2. Divide each edge in two by positioning a new vertex in its middle.
  3. Add new edges.
  4. Iterate to 2 until it's good enough.


  1. Gets expensive fast. Do as few iterations as possible.
  2. Don't look directly down on it. Why?
  3. h(n) will need extensive tweaking. Don't get discouraged if you don't get the results you want right away.
  4. You could do the first few iterations by hand to control the large-scale result.

What is it good for?

  1. Mountains
  2. Rolling hills
  3. Sand dunes. You will want h(n) to depend on the direction of the edge.
  4. etc.

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 edges (3 floats)
  2. Array of faces (pointers to vertices, needs to know number of vertices)
  3. Build the arrays as you read the input.


  1. Finding the faces that surround a vertex, or the edges that emanate from a vertex
  2. Modifying the mesh.
    1. Add a vertex and a face, easy.
    2. Add a vertex, split a face, need to find the face.
    3. What's hard is finding the face to delete. ( O(nFaces) )

An improved solution

  1. Build a list of faces for each vertex when reading the input
  2. Can now find faces from vertices. To split a vertex
  3. General deletion is still hard, unless you are willing to tolerate holes in the array.

Winged Edge Data Structure

Return to: