assignment_2 - 6.837 Introduction to Computer Graphics...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: 6.837 Introduction to Computer Graphics Assignment 2: Transformations and additional primitives Due Wednesday September 24, 2003 at 11:59pm In this assignment, you will add new primitives, planes and triangles, as well as ane transformations. You will also implement a perspective camera, and add two simple shading modes: diffuse shading and normal shading. At this point, we will leave the shading computation in the main loop. In the next assignment, we will develop a special class for this computation. For normal shading, you will simply display the coordinates of the normal vector as an ( r, g, b ) color. For example a normal pointing in the z direction will be displayed as pure blue (0 , , 1). You should use black as the color for the background (undefined normal). Diffuse shading is our first step to model the interaction of light and materi- als. The scene parser now provides you with alight source. Given the direction L and the normal N , we can compute the diffuse shading as a to the light clamped dot product I N if L. L. N > , d = otherwise If the visible object has color ( r, g, b ), and the light source has color ( L r , L g , L b ), then the color of the pixel is ( rL r d, gL g d, bL b d ). The scene parser reads an array of light sources (see scene_parser.h . For this assignment, you can consider that there is only one light (index 0). But you can also decide to do it the clean way and write a loop on all light sources and add their contributions (i.e. add all the ( rL r d, gL g d, bL b d )). See below how to access the light source. 1 T a s k s Update the Hit data structure to store normals. Update your sphere intersection routine to pass the normal to the hit. Add simple normal and diffuse shading. At this point, they can be imple- mented in the main loop. Diffuse shading should include an ambient term 1 (see below in the light section.) Add a perspective camera class, and implement the ray-generation method....
View Full 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_2 - 6.837 Introduction to Computer Graphics...

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

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