Camera DOF Diagram

From K-3D

Jump to: navigation, search

How a camera object can schematically represent it's DOF related properties.

Image:DOF_diagram_1b.svg

  • Red lines indicate DOF by showing the size of the Circles of Confusion for a point source of light at any given distance from the Film Plane which is indicated by the blue line runing through the camera.
  • Green Lines show Field of View.
  • The black box with the blue circle is the indicator for the the f-Stop setting, the line passing through it to the second blue line forms a scale that indicates the Focal Length.
  • The third blue iine (where the red lines cross over) is the Focus Plane.
  • N.B. the use of arrow heads to indicate lines that run to infinity.


The size of the Circles of Confusion for a range of FStops will look like this:

Image:DOF_calc_CofC_sizes_1.png

fov = 30; screenx = 1024; screeny = 768; focaldistance = 400; maxfstop = 22; maxdepth = 1000;


 AspectRatio=(ScreenWidth/ScreenHeight)
 FocalLength=AspectRatio/(TAN(FOV/2))
 LensDiameter=(FocalLength/FStop)
 CircleOfConfusionSize=ABS(LensDiameter*((FocalDistance*FocalLength)
   /(FocalDistance-FocalLength))*((1/Depth)-(1/FocalDistance)))