Graphics Reference
In-Depth Information
We note that
r
+
r
is orthogonal to
n
therefore
.
(
r
+
r
)=0
n
and
.
.
r
= 0
n
r
+
n
(12.9)
We also note that
p
−
q
is parallel to
n
therefore
r
=
λ
n
p
−
q
=
r
−
where
λ
is some scalar therefore
r
λ
=
r
−
(12.10)
n
From the figure we note that
r
=
p
−
t
(12.11)
substituting (12.8) in (12.11)
.
.
.
.
n
r
=
n
p
−
n
t
=
n
p
+
c
(12.12)
substituting (12.9) and (12.12) in (12.10)
.
.
.
r
λ
=
n
r
−
n
=
2
n
r
.
n
.
n
n
n
.
λ
=
2(
n
p
+
c
)
n
.
n
and the position vector is
λ
n
Let's again test this formula with a scenario that can be predicted in advance.
Given the line equation
q
=
p
−
1=0
and the point
P
(1
,
1) the reflection must be the origin, as shown in Figure 12.11.
Let's confirm this prediction. From the line equation
x
+
y
−
a
=1
b
=1
c
=
−
1
and
x
P
=1
y
P
=1
λ
=
2
×
(2
−
1)
=1
2
therefore
x
Q
=
x
P
−
λx
n
=1
−
1
×
1=0
y
Q
=
y
P
−
λy
n
=1
−
1
×
1=0
and the reflection point is
Q
(0
,
0).