MP 1
CS 296: Machine Problem 1
Due: March 5, 11:55pm
Bare Bones Ray Tracing
For your first programming assignment you will implement a bare bones ray-tracer with the following capabilities:
Ray-object intersection support for:
- Planes
- Spheres
- Triangles
Orthographic projection
Perspective projection
Jittered sampling for the primary rays
Simple Lambertian shading using a directional light with no position
Hand-in
You will hand in your code and 2 images:
One orthographic rendering of a scene with spheres and a plane and a triangle
One perspective rendering of the same scene
Hand-in will be done on Compass and detailed instructions will be forthcoming
Technical Details
You should use C++
You can use any image library you want (e.g. libpng) or write your own code to write a ppm file
You can use any math library you want (e.g. glm)
Keep in mind that if you use code you didn’t write, you must document the use of that code
Grading: Total of 40 pts
Each item is worth 5 points:
Compiles and writes out an image!
Orthographic projection
Perspective projection
Sphere intersection
Plane intersection
Triangle intersection
Anti-aliasing
Shading