Assignment 3 Camera Simulation

Shradha Budhiraja

Date submitted: 05 May 2006

Code emailed: ?? May 2006

Compound Lens Simulator

Description of implementation approach and comments

The lens simulator works on the basic principles of refraction through glass. At first, it was important to convert the raw image coordinates given by the sample to appropriate camera coordinates. Samples on the lens were taken by using the sample->lensU/lensV and passing it to the concentricSampleDisk. These determined the original direction of the ray. This was used to calculate cos(theta) for the weight of the ray.

The next step was to perform the sphere-ray intersections as the ray passes through each lens in stack. This was done by simply plugging the equation of a ray (o + td) into the equation of a sphere and solving the quadratic in t. If the intersection point is beyond the aperture, the ray does not make it to the world.

The ray now had to be refracted through the lens using snell's law. I first tried rotating the ray by the new angle found through snell's law. After a lot of debugging, I realised this was not going to work. Searching through the internet, I found a paper which found the direction of the refracted ray in a more sophisticated manner. I used the method described in the paper to calculate the direction of the ray. If this direction had inverted, it was a case of total internal reflection and the ray was ignored.

Final Images Rendered with 512 samples per pixel

My Implementation

Reference

Telephoto

hw3telephoto_512

Double Gausss

hw3dgauss_512

Wide Angle

hw3wide_512

Fisheye

hw3fisheye_512

Final Images Rendered with 4 samples per pixel

My Implementation

Reference

Telephoto

hw3telephoto_4

Double Gausss

hw3dgauss_4

Wide Angle

hw3wide_4

Fisheye

hw3fisheye_4

Experiment with Exposure

Image with aperture full open

Image with half radius aperture

blank300x300

blank300x300

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

hw3afdgauss_closeup

Double Gausss 2

mm

hw3afdgauss_bg

Telephoto

mm

hw3aftelephoto

Any Extras

...... Go ahead and drop in any other cool images you created here .....

ShradhaBudhiraja/Assignment3 (last edited 2006-05-08 07:53:42 by ShradhaBudhiraja)