Calculate Angle of View



float $aperture = `getAttr perspShape.hfa`;
float $fl = `getAttr perspShape.focalLength`;
float $fov = $aperture * 0.5 / ( $fl * 0.03937 );
$fov = 2.0*atan($fov) / 3.14159 * 180.0;
print(" angle of view in degrees: " + $fov);

This piece calculates angle-of-view of a camera from its Focal Length and Horizontal Film Aperture.


评论回复