= Assignment 3 Camera Simulation = == Name == == Date submitted: ?? May 2006 == == Code emailed: ?? May 2006 == == Compound Lens Simulator == === Description of implementation approach and comments === Well, the implementaiton consisted of 4 parts: 1) Reading in the file. After learning how to use c++ streams this wasn't too bad at all. My main issue that cost me coutless hours is that the file is BACKWARDS from what I thought it was. We always trace rays from the camera, so naivly I thought that is how the file would be set up. Woe was me :) Thanks for the help Tarang! I created a lensSphere object that holds the center of the sphere, its radius, n, previous n, and apature size. This handles the intersection too. 2) Sampling the back lens. Not too hard. 3) Sphere interesection. This wasn't working for the longest time. I know how to use the Quadratic function properly so I did the quadratic formula myself. Thanks grade 12 math. 4) Snell's Law. I did this 3 ways. First I tried to rotate about the cross product of the ray and the normal by the correct sin. Didn't work. Then I found a paper on the vector form of snell's law. Worked. Then I found something on wikipedia, which also worked. My images are still kinda funky. Kayvon and I spend 1.5 hours trying to fix them, but to no avail. If anyone has any ideas as to why there is some transparency in the middle and sides of my image please let me know! === Final Images Rendered with 512 samples per pixel === || || '''My Implementation''' || '''Reference''' || || '''Telephoto''' ||attachment:hw3.telephoto_512.png||http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.telephoto_512.png|| || '''Double Gausss''' ||attachment:hw3.dgauss_512.png||http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.dgauss_512.png|| || '''Wide Angle''' ||attachment:hw3.wide_512.png||http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.wide_512.png|| || '''Fisheye''' ||attachment:hw3.fisheye_512.png||http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.fisheye_512.png|| === Final Images Rendered with 4 samples per pixel === || || '''My Implementation''' || '''Reference''' || || '''Telephoto''' ||attachment:hw3.telephoto_4.png|| http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.telephoto_4.png|| || '''Double Gausss''' ||attachment:hw3.dgauss_4.png||http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.dgauss_4.png|| || '''Wide Angle''' ||attachment:hw3.wide_4.png||http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.wide_4.png|| || '''Fisheye''' ||attachment:hw3.fisheye_4.png||http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.fisheye_4.png|| == Experiment with Exposure == || '''Image with aperture full open''' || '''Image with half radius aperture''' || || attachment:hw3.full_open.png || attachment:hw3.half_open.png || === Observation and Explanation === ...... == Autofocus Simulation == === Description of implementation approach and comments === ...... === Final Images Rendered with 512 samples per pixel === || || '''Adjusted film distance''' || '''My Implementation''' || '''Reference''' || || '''Double Gausss 1''' || __ mm || http://graphics.stanford.edu/courses/cs348b-06/homework3/blank300x300.jpg|| http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.afdgauss_closeup.png|| || '''Double Gausss 2''' || __ mm ||http://graphics.stanford.edu/courses/cs348b-06/homework3/blank300x300.jpg||http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.afdgauss_bg.png|| || '''Telephoto''' || __ mm ||http://graphics.stanford.edu/courses/cs348b-06/homework3/blank300x300.jpg||http://graphics.stanford.edu/courses/cs348b-06/homework3/hw3.aftelephoto.png|| == Any Extras == ...... Go ahead and drop in any other cool images you created here .....