assignment_1 - 6.837 Introduction to Computer Graphics...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Computer Graphics Assignment 1: Ray Casting Due Wednesday September 17, 2003 at 11:59pm In this assignment, you will implement a basic ray caster. This will be the basis of all the following assignments, so proper code design is quite important. As seen in class, a ray caster sends a ray for each pixel and intersects it with all the objects in the scene. You will implement a ray caster for an orthographic camera (parallel rays) for sphere primitives. You will use a very basic shading model: the objects have a constant color. As an alternative, you will also display the distance t of each pixel to the camera. You will use object-oriented design to make your ray-caster flexible and extendable. A generic Object3D class will serve as the parent class for all 3D primitives. You will derive subclasses, such as Sphere , to implement specialized primitives. In later assignments, you will extend the set of primitives with planes and polygons. Similarly, this assignment requires the implementation of a general Camera class and an OrthographicCamera subclass. In the next assignment, you will also derive a general perspective camera. We provide you with a Ray class and a Hit class to manipulate camera rays and their intersection points. 1 Tasks Write a pure virtual Object3D class (see speciFcations below). Derive Sphere , a subclass of Object3D , and implement the intersection of a sphere with a ray. Derive Group , also a subclass of Object3D , that stores an array of pointers to Object3D instances. Write the intersection routine. Write a pure virtual Camera class and subclass OrthographicCamera . Write the corresponding ray generation method for the subclass. Use the input Fle parsing code provided to load the camera, background color and objects of the scene. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/14/2011 for the course EECS 6.837 taught by Professor Durand during the Fall '03 term at MIT.

Page1 / 5

assignment_1 - 6.837 Introduction to Computer Graphics...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online