---
title: focalLength
framework: modelio
role: symbol
role_heading: Instance Property
path: modelio/mdlcamera/focallength
---

# focalLength

The focal length, in millimeters, of the camera’s simulated lens.

## Declaration

```swift
var focalLength: Float { get set }
```

## Discussion

Discussion In a physically based camera, field of view is based on the focal length of the lens and the vertical aperture of the imaging surface (film or sensor). Changing the focalLength or sensorVerticalAperture property updates the fieldOfView property to the corresponding value, and vice versa. The default focal length is 50mm, corresponding to a field of view of 54 degrees, and vertical sensor aperture of 24mm.

## See Also

### Modeling a Physical Lens

- [barrelDistortion](modelio/mdlcamera/barreldistortion.md)
- [fisheyeDistortion](modelio/mdlcamera/fisheyedistortion.md)
- [opticalVignetting](modelio/mdlcamera/opticalvignetting.md)
- [chromaticAberration](modelio/mdlcamera/chromaticaberration.md)
- [fStop](modelio/mdlcamera/fstop.md)
- [apertureBladeCount](modelio/mdlcamera/aperturebladecount.md)
- [bokehKernel(withSize:)](modelio/mdlcamera/bokehkernel(withsize:).md)
- [maximumCircleOfConfusion](modelio/mdlcamera/maximumcircleofconfusion.md)
- [focusDistance](modelio/mdlcamera/focusdistance.md)
- [shutterOpenInterval](modelio/mdlcamera/shutteropeninterval.md)
