Graphics Reference
In-Depth Information
We'd get the point
(
1
3
,
3
)
, which also lies on the line between
P
and
Q
,butis
closer to
Q
. In fact, we can compute
(
1
−α
)
P
+
α
Q
(7.23)
=
2
we
for any number
α
: With
α
=
1 we get
Q
; with
α
=
0 we get
P
; with
α
get
M
; and with any value of
α
between 0 and 1 we get points on the line segment
between
P
and
Q
.
What happens when we consider values of
that are less than 0? Those cor-
respond to points on the line beyond
P
; similarly, ones with
α
α>
1 are beyond
Q
.
In summary:
As
α
ranges over the real numbers, the points
(
1
− α
)
P
+
α
Q
range over
the line containing
P
and
Q
, with
α
=
1 corresponding to
P
and
α
=
0
corresponding to
Q
, and values of
α
between 0 and 1 corresponding to points
between P
and
Q
.
With this in mind, we can define a function
R
2
:
t
γ
:
R
→
→
(
1
−
t
)
P
+
tQ
.
(7.24)
The image of this function is the line between
P
and
Q
; if we restrict the domain
to the interval
[
0, 1
]
, then the image is the line
segment
between
P
and
Q
. We call
this the
parametric form of the line between
P
and
Q
, where the argument
t
is
the
parameter.
(In Section 7.6.4 we'll justify this particular use of the multiply-
by-scalars-and-add operation applied to points.)
Inline Exercise 7.2:
We discussed that certain coordinate constructions are
invariant under changes in coordinate systems. If two people place coordinate
systems on the same tabletop and compute lengths, angles, and areas, will they
always get the same results? In other words, are lengths, angles, and areas
invariant under changes of coordinates? If not, can you think of particular con-
ditions on the coordinate systems under which these
are
invariant? Note: The
length
of the segme
nt from
(
x
1
,
y
1
)
to
(
x
2
,
y
2
)
in a Cartesian coordinate system
is defined to be
(
x
2
−
y
1
)
2
; you'll need to figure out similar
definitions of angle and area to answer this question.
x
1
)
2
+(
y
2
−
We'll return to lines presently; before we do so, however, we'll codify some of
the ideas above by relating them to vectors. The term “vector” gets used in many
fields to mean many things. For now, we'll content ourselves with one particular
type of vector, a
coordinate vector,
which is simply a list of real numbers. An
n
-vector is a list of
n
numbers; we'll write these between square brackets, orga-
nized vertically:
⎡
⎤
1
−
⎣
⎦
,
4
0
(7.25)