Shadows, Reflections and Instancing

You will need to download more java files.

Instancing

To add instancing to your Ray Tracer, you will need three transform methods to the Matrix class, as described in Chapter 21 on pages 421 and 424.

Then add the Instance class (child of the GeometricObject class) to your Ray Tracer (included in the above zip file).

Then you can test your ray tracer using Figure 21.05(b) and Figure 21.15, although you will not get exactly these results until you implement shadows.


Reflections

To add reflections to your Ray Tracer, you will need to make the modifications described in Chapter 24, specifically those changes described on page 498. Luckily, three of the new classes are included in the zip file you downloaded. You will need to:

Then you can test your ray tracer using Figure 24.17, Figure 24.18, and Figure 24.20. Again, you still need to implement shadows to get exactly these images.

Shadows

This is the tricky part of the assignment. To add shadows, you will need to modify every Material class, every Light class, and every GeometricObject class, as described in Chapter 16 on page 299:

For testing your shadow code, try to generate the cover image on page 293, Figure 16.10 and Figure 16.11(b).


Questions

Answer the following questions:

  1. Questions 16.1, 16.2 and 16.4 on page 306. To demonstrate your answer to question 16.4, create an image "SelfShadow.jpg" which shows an object that self-shadows.
  2. Exercises 16.1 on page 307.
  3. Questions 21.1 and 21.2 on page 437.
  4. Questions 24.2, 24.3, 24.4 on page 520.

Images

Once you have completed Instancing, Reflections and Shadows, turn in:


Last modified: Thu Mar 10 13:09:25 MST 2011