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 |
|
|
Double Gausss |
||
Wide Angle |
||
Fisheye |
Final Images Rendered with 4 samples per pixel
|
My Implementation |
Reference |
Telephoto |
|
|
Double Gausss |
||
Wide Angle |
||
Fisheye |
Experiment with Exposure
Image with aperture full open |
Image with half radius aperture |
|
|
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 |
|
|
Double Gausss 2 |
mm |
||
Telephoto |
mm |
Any Extras
...... Go ahead and drop in any other cool images you created here .....