Graphics Reference
In-Depth Information
3.11 A line equidistant from two points
The problem here is to identify a line that is equidistant from two points and is perpendicular
to the line connecting the two points. This is a problem that only exists in R
2
; the R
3
equivalent
involves a plane equidistant from two points. So let's consider a parametric solution using the
perp operator.
Y
P
2
v
P
p
2
n
p
P
1
p
1
X
Figure 3.31.
With reference to Fig. 3.31, we see that
n
=
p
2
−
p
1
=
x
2
−
x
1
i
+
y
2
−
y
1
j
The line's direction vector
v
is perpendicular to
n
:
n
⊥
=−
v
=
y
2
−
y
1
i
+
x
2
−
x
1
j
The position vector
p
is given by
1
2
p
2
+
p
=
p
1
Therefore, any point
q
on the line is given by
q
=
p
+
v
More explicitly:
x
q
=
1
2
x
2
+
x
1
−
y
2
−
y
1
1
2
y
2
+
y
q
=
y
1
+
x
2
−
x
1