Game Development Reference
In-Depth Information
R ESHAPING THE P ARABOLA
As elegant as the above parabola is, it is unlikely that its shape will exactly fit our
needs. We may want to make it wider or narrower, or skew it slightly one direction
or the other. The formula can be modified a number of ways to affect the shape of
a parabola. Many of them come with caveats, however, that we must be aware of.
Increasing the Exponent
The first major modification that we can make to a quadratic equation is to change
the exponent ( k ). Doing so changes the rate at which the slope of the parabola
changes. That is, it makes the parabola narrower or wider.
One thing we must remember, however, is that odd exponents (e.g., 3, 5) will
cause the portion of the parabola to the left of the vertex to curve downward (Figure
10.4). The reason we note this as “to the left of the vertex� rather than “below 0�
is that if we shift the parabola horizontally using the techniques above, the x loca-
tion of vertex may be greater than or less than 0. The inflection change happens at
the vertex… not at the y -axis. We can avoid this effect by taking the absolute value
of the function. In that case, both arms of the parabola still extend in the same
direction.
FIGURE 10.4 The quadratic function y = x k with the values of k as 2, 3, 4, and 5.
As the exponent increases, the parabola narrows. Also, odd exponents cause
the portion of the curve below 0 to descend rather that ascend.
(Note that we can avoid the negative y effect by taking the
absolute value of the function.)
Search WWH ::




Custom Search