Game Development Reference
In-Depth Information
The d is the distance between the two points. From the perspective afforded by
the Pythagorean theorem, the difference the delta sign signifies is the difference
between the corresponding elements in the coordinate pairs you use in your
calculations.
To return to the discussion of the point-slope equation, you can revise it slightly
using what you know about the Pythagorean theorem. Consider a line on which
you have identified two points, ðx 1 , y 1 Þ and ðx 2 , y 2 Þ . Drawing upon the for-
mulation of the Pythagorean theorem introduced in the previous section
x 2
y 2
¼ d 2
D
þ D
you can then proceed to establish a specific formula, called the distance formula,
for determining the distance between two points:
ðy 2 y 1 Þ
2
2
¼ d 2
þðx 2 x 1 Þ
p
ðy 2 y 1 Þþðx 2 x 1 Þ
d ¼
Having attended to these preliminaries, you can then ascertain the distance
between any two points on a line in a fairly ready manner. Assume, for example,
that you begin with two ordered pairs (2, 3) and (4, 7). You substitute these
values into the primary terms of the equation:
D
y ¼ 7 ð 3 Þ¼ 10
x 2
D
¼ 4 2 ¼ 2
p
10 2
þ 2 2
d ¼
p
104
d ¼
Exercise Set 7.3
Use these ordered pairs with the distance formula to find the distance between points.
a. (1, 0) (13, 4)
b. (2, 1) (14, 9)
c. (0, 4) (10, 16)
d. (0, 0) (2, 10)
e. (1, 2) (13, 8)
Search WWH ::




Custom Search