# Projects

The idea is simple:

1. Think about what you want your result to do and to look like.
2. Choose technical objectives that make your result better than it would otherwise be
• Some should be easy; some hard.
3. Make an implementation plan
• Should be incremental: you might not get completely finished :-).
4. Implement
• Should do your easy objectives first.
5. Demo your project
• Should be able to show the effect of your technical objectives clearly
• On-off toggle for interactive projects; sample images for others.

#### Types of Projects

Contemplative

1. Still image
2. Animation
• Static
• Dynamic

Interactive

1. Game
2. Visualization

Architecture

Art

Game

Geometry

Nature

Simulation

#### Rendering Style

Photorealistic

• OpenGL
• Ray Tracing

Non-photorealistic

#### Resources

For what to do

• A5 assignment description on the web page; it's long but everybody ahould read all of it.

For project ideas

• Previous CS488 projects

For possible objectives

• The last half of the course notes

# Ray Tracing

## Intersection Tests

E + t*(P - E)

#### Object in scene

Set of points {Q} satisfying

• f(Q) = 0
• Usually f(Q) is a distance function from the surface.
• f(Q) > 0 means outside,
• f(Q) < 0 means inside
• This is the surface of an object. (How do you know?)
• Why don't we care about inside points?

Solve the equation

• f(E + t*(P-E)) = 0 for t.

#### Another idea: intersect in object coordinates

• In object coordinates each point is given by the object definition.
• In world coordinates each point in object coordinates is Q = MQ', where Q' is the point in object coordinates
• M is the affine modelling transformation, therefore invertible
• f'(Q') is the object definition in object coordinates, which is usually known
• Use invM to transform E,P to E',P', then solve the equation for t
• Find intersection point in world coordinates as E + t*(P-E)

### Shading for Ray Tracing

When we have found the intersection point we need to calculate a colour.

We know

1. The eye ray, Q-E
2. Surface properties
3. The normal vector
• by interpolation from vertex normals
• by calculation from the equation of the surface

For each light

1. Calculate illumination: RGB, l
2. Accumulate outgoing light

#### How about shadows?

In principle,

1. Do an intersection test from the light
• in the direction of the eye ray intersection
2. If it hits the eye ray intersection, then
• intersection illuminated by that light

else

• intersection in shadow from that light