CMPS-3480 Computer Graphics
Lab-11

Overview:

Start:

For this lab you will start your semester project.

1. Choose a lab framework.
   Put your program, Makefile, images, etc. into your 3480/b directory

2. Do some coding.

3. Produce some sort of graphics.

4. Update your web page to make it very clear what your project is about.

   a. give your project a title
   b. write a few sentences describing what you will do
   c. list the computer graphics challenges you will solve
   d. post an image that is close to what you want to produce



Code for transmission of light through a transparent ball.

Written in class Wednesday Nov 10.
Code goes in the trace() function.

    if (o->transmission == 1) {
        //shoot another ray 
        Ray tray;
        //
        //Here is where you could refract the ray direction.
        //
        Vec trgb;
        tray.d.copy(ray->d);
        tray.o.copy(closehit.p);
        //nudge the ray forward
        tray.o.x += tray.d.x * 0.00001;
        tray.o.y += tray.d.y * 0.00001;
        tray.o.z += tray.d.z * 0.00001;
        //recursive call to trace()
        trace(&tray, trgb, weight*0.9, level+1);
        trgb.scale(weight);
        rgb.add(trgb);
    }
Scratch-a-pixel light transmission and Whitted image




texture map for Diana's beachball







What to turn in...
Your instructor will find your work out on Odin!