For this project, we were supposed to keep everything very simple and just raytrace our first sphere. To minimize the amount of work needed, I just re-used my code from the first project (the image viewer), and added one new function to raytrace a sphere into texture instead of reading the texture from a ppm file. I also added some code to visualize the depth of each point where a ray intersects the visible side of the sphere.
I also added code to this project to allow me to save a screenshot of my raytraced image to a ppm file, complete with a comment in the header including a command-line sequence to recreate the image! Unfortunately (or maybe not, they're big files) I can't add a ppm image to this blog entry, so I used "convert", included with ImageMagick, to make my ppm into a png.
If you're on the UNM CS network, you can check out my repository with:
svn checkout file:///nfs/student/s/switt/svnrepository
Then change into the assignment02 directory:
cd svnrepository/cs513/assignment02/
Finally, view the README to see how to build (with CMake) and run:
more README.txt
No comments:
Post a Comment