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
Forkers
tomek-stolarczykRecommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.