[DM41X] Hyperfocal Distance and Depth of Field calculator

Contributed programs for the DM41 go here.
Post Reply
jthole
Posts: 78
Joined: Mon Nov 27, 2017 7:46 pm
Location: Netherlands

[DM41X] Hyperfocal Distance and Depth of Field calculator

Post by jthole » Sun Feb 02, 2020 6:07 pm

This was tested on the DM41X, but should also work on the DM41, since no additional ROMs are used

This is an adaptation of a Depth of Field calculation that I have stored in my HP 17Bii (I love that solver!). Given the subject distance (in meters), focal length of a lens (in mm), the aperture, and "circle of confusion", it computes the depth of field, near point, far point, and hyperfocal distance (all in meters).

Here is a good article by Fujifilm on the Circle of Confusion, and hyperfocal distance.

As an example: (using CoC=0.010 for the Fujifilm APS-C sensor)

DISTANCE? 10
FL? 35
APERTURE? 2.8
COC? 0.010

returns:

DOF 4.832 (R/S)
HFD 43.750 (R/S)
NP 8.145 (R/S)
FP 12.976 (R/S)

If the DOF (and Far Point) is infinite, it is represented as 99999.999.

As an example: (wide angle lens, focused far away)

DISTANCE? 100
FL? 14
APERTURE? 8
COC? 0.010

returns:

DOF 99,999.999 (R/S)
HFD 2.450 (R/S)
NP 2.392 (R/S)
FP 99,999.999 (R/S)

Code: Select all

LBL "DOFC"
RCLFLAG  ;XROM 25,32
STO 20
FIX 03
"DISTANCE?"
PROMPT
1000
*
STO 10
"FL?"
PROMPT
STO 11
"APERTURE?"
X^2
PROMPT
"COC?"
PROMPT
*
/
ENTER
STO 12
RDN
*
STO 13
RDN
+
RCL 11
-
R^
X<>Y
/
STO 14
RDN
RCL 10
-
RCL 11
-
/
STO 15
RCL 14
-
"DOF "
XEQ 01
"HFD "
RCL 12
XEQ 01
"NP "
RCL 14
XEQ 01
"FP "
RCL 15
XEQ 01
RCL 20
STOFLAG  ;XROM 25,45
0
ENTER
ENTER
ENTER
RTN
LBL 01
1000
/
RND
X<0?
99999.999
ARCL X
AVIEW
STOP
RTN
END
Attachments
dofc.raw
(147 Bytes) Downloaded 5 times

Post Reply