Giter Site home page Giter Site logo

418a3's Introduction

For this assignment just look for TODO in the code.  You shouldn't
have to change anything else.  In particular, DO NOT change anything
in main().

The TODOs include
 - setting up the rays in world space and calling the right function to
   traverse the scene,
 - implementing the intersection routines for the primitives by filling
   in the intersection field in the Ray3D structure, and
 - implementing the shading function, which should fill in the col
   field in the Ray3D structure (depends on the material of the
   intersected object, of course).

The main() function contains the scene description. It automatically
renders two views from the same scene, which are then saved in files.
If you implemented everything correctly, it should produce images
like those shown in the assignment handout.

You need to hand in images from three runs of the program, showing
the following three renderings of the scene (each of which saves 2 images):
1. scene signature
  You could do this by setting ray.col in the shading function simply 
  to ray.intersection.mat->diffuse.  It will generate the scene 
  signiture if the intersection routine is implemented correctly.
2, scene with diffuse plus ambient shading
3. scene with the full Phong model


File Descriptions:

raytracer.{cpp, h} 
The main body of the raytracer, including the scene graph.  Simple 
addition and traversal code to the graph are provided to you.  

util.{cpp, h}
Includes definitions and implementations for points, vectors, matrices, 
and some structures for intersection and shading.  

light_source.{cpp, h}
Defines the basic light class.  You could define different types of 
lights, which shades the ray differently.  Point lights are sufficient 
for most scenes.  

scene_object.{cpp, h}
Defines object primitives in the scene (spheres, cylinders, etc...).  
Implements the intersect function which finds the intersection point 
between the ray and the primitive. 

bmp_io.{cpp, h}
I/O functions for .bmp files.  You shouldn't have to modify them.   

418a3's People

Contributors

jiecaowang avatar tomek-stolarczyk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.