Game Development Reference
In-Depth Information
t varies. For example, consider the classic parametric description of a unit
circle,
x(t) = cos(2πt),
y(t) = sin(2πt).
Parametric description
of a circle
(13.1)
We briefly introduced parametric representation of geometric primitives
in Section 9.1. Let's take a moment to review some of the alternative forms
from that section so we can understand ways of describing a curve that
are not parametric. An implicit representation is a relation that is true
for all points in the shape being described; for example, the unit circle
can be described implicitly as the set of points satisfying x 2 + y 2 = 1.
Another alternative to parametric form is the functional form, in which one
coordinate is expressed as a function of the other coordinate or coordinates;
for example, the top half of a unit circle can be described in functional form
as y =
1 − x 2 .
The curve p (t) could be infinite, particularly if we place no limits on the
range of t. Often it's useful to select a finite segment by restricting t to a
particular bounded domain, most commonly the domain [0,1]. It's natural
to designate the “forward” direction as the direction of increasing t, so the
curve “starts” at t = 0, “ends” at t = 1, and consists of all of the points
between.
Sometimes we think of the position function p (t) as a single function
that yields a vector result; other times it will be helpful to extract the
function for a specific coordinate. For example, the scalar function x(t)
specifies the x-coordinate of p (t), so in two dimensions p (t) = (x(t), y(t)).
Notice that each coordinate is specified by a function that depends only on
the parameter value so that each coordinate is independent of the others.
We work in the plane for the majority of this chapter because almost every
important aspect of parametric curves can be demonstrated in 2D and, in
general, extension into three dimensions is straightforward.
13.1.2
Polynomial Curves
Now that we know what the adjective parametric means, let's turn our
attention to the second important word, polynomial. A polynomial para-
metric curve is a parametric curve function p (t) that can be written as a
polynomial in t:
Polynomial parametric
form of arbitrary
degree n
p (t) = c 0 + c 1 t + c 2 t 2 + + c n−1 t n−1 + c n t n .
The number n is called the degree of the polynomial. Higher degree poly-
nomials are more flexible in the sense that they can describe curves with
 
Search WWH ::




Custom Search