hdworld11 / a3p1 Goto Github PK
View Code? Open in Web Editor NEWa3p1
a3p1
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.