29
20
The distance between a line and a point
The distance between a point
and a straight line
, as in the diagram on the right, is given by the
formula:
Program
?→ X:?→ Y:?→ A:?→ B:√(
(AX - Y + B)÷(1+ A
2
))→ D:D <
38 STEP
>
INPUT
X
,
Y
: co-ordinates of the point
A
(
X, Y
) A : gradient B : y-intercept
OUTPUT
D
: the distance between the line
y
=
A
x
+
B
and the point
A
(
X, Y
)
Execution Example:
Calculate the distance between the point (3, 4) and the straight line
.
A x
y
( , )
y
ax
b
+
=
AH
ax y
–
b
+
1
a
2
+
------------------------
=
A
H
(
x, y
)
y=ax+b
ON
MODE
MODE
MODE
1
PRGM
MODE
1
COMP
1
P1
y
7
x
9
+
=
Prog
1
S A
D R
P1
P1 P2 P3 P4
G
3
EXE
4
EXE
S A
D R
P1
P1 P2 P3 P4
G
7
EXE
9
EXE
M
S A
D R
P1
P1 P2 P3 P4
G
関数電卓事例集
.book 29
ページ
2002年9月2日 月曜日 午後6時51分
Summary of Contents for 3950P
Page 1: ......
Page 46: ...MEMO MEMO MEMO MEMO...
Page 47: ...Authors Dr Yuichi Takeda Research and Development Initiative Chuo University...
Page 48: ......