i
i
i
i
i
i
i
i
2.5. Curves and Surfaces 39
2.5.6 2D Parametric Curves
A parametric curve is controlled by a single parameter that can be considered a
sort of index that moves continuously along the curve. Such curves have the form
x
y
=
g(t)
h(t)
.
Here (x, y) is a point on the curve, and t is the parameter that influences the curve.
For a given t, there will be some point determined by the functions g and h.For
continuous g and h, a small change in t will yield a small change in x and y.
Thus, as t continuously changes, points are swept out in a continuous curve. This
is a nice feature because we can use the parameter t to explicitly construct points
on the curve. Often we can write a parametric curve in vector form,
p = f(t),
where f is a vector-valued function, f : R → R
2
. Such vector functions can
generate very clean code, so they should be used when possible.
We can think of the curve with a position as a function of time. The curve
can go anywhere and could loop and cross itself. We can also think of the curve
as having a velocity at any point. For example, the point p(t) is traveling slowly
near t = −2 and quickly between t =2and t =3. This type of “moving point”
vocabulary is often used when discussing parametric curves even when the curve
is not describing a moving point.
2D Parametric Lines
A parametric line in 2D that passes through points p
0
=(x
0
,y
0
) and p
1
=
(x
1
,y
1
) can be written
x
y
=
x
0
+ t(x
1
− x
0
)
y
0
+ t(y
1
− y
0
)
.
Because the formulas for x and y have such similar structure, we can use the
vector form for p =(x, y) (Figure 2.34):
Figure 2.34. A 2D para-
metric line through p
0
and
p
1
. The line segment de-
fined by
t
∈ [0,1] is shown
in bold.
p(t)=p
0
+ t(p
1
− p
0
).
You can read this in geometric form as: “start at point p
0
and go some distance
toward p
1
determined by the parameter t.” A nice feature of this form is that
p(0) = p
0
and p(1) = p
1
. Since the point changes linearly with t,thevalueof
t between p
0
and p
1
measures the fractional distance between the points. Points