[Sidefx-houdini-list] aperture focal length relations

Adrian Lee dryrainstudios at gmail.com
Fri Jun 22 05:40:20 EDT 2007


All bastards aside...I think an asset would be a very useful thing.

I got this back from the guy who made the aov site. It backs up alot of
whats said here but I like the txt image. Difference for 35mm film well
noted -thanks Mario

#####
That code is not very clean. Anyway the formula is very simple:

--------+---------      image plane
 \      |      /
 \     |     /
  \    |    /
   \   |   /
    \  |  /
     \ | /
      \|/
--------*---------      lens center
      /|\                         }
   h / | \                        } f = focal
    /  |  \                       } length
   /   |   \                      }
--------+---------      focal plane
   |<----->|                      }
       l

We have above 4 triangles rectangles. So using a bit of trignometry we
can see the relation between alfa (the angle-of-view), f (focal length),
l (the dimension in the focal plane) and h (hypotenuse):

(1)     l/2 = h * sin (alfa/2)
(2)     f = h * cos (alfa/2)

dividing (1) by (2) h disappears:

       (l/2)/f = tan(alfa/2)   <=>
<=>     alfa/2 = arctan((l/2)/f)
or      alfa = 2 * arctan((l/2)/f)

In most programming languages arctan gives the result in radians so one
needs to convert to degrees:
       alfa = 2 * arctan((l/2)/f) * 180 / PI

#####

Ed



More information about the Sidefx-houdini-list mailing list