Game Development Reference
In-Depth Information
Q UADRATIC F UNCTIONS
We can create another common and useful function in a similar fashion to the lin-
ear function above. By inserting an exponent into the formula, we create one of the
veritably plethoric varieties of quadratic functions . Rather than being a straight
line, the quadratic family exhibits parabolic curves. The most simple of these equa-
tions is the familiar
This function creates a parabola centered on the y -axis whose vertex (the point
where the parabola changes direction) crosses the origin. The exponent ( k ) can be
any non-zero real number. For simplicity's sake, however, let's restrict ourselves to
k = 2 over the next few examples. (A little further on, we will see why different
values of k can complicate things.)
Most of us are used to thinking of equations with exponents as exponential
functions . That term, however, has a very specific meaning. Technically, functions
with a squared component (or higher) are referred to as quadratic .
Additionally, while quadratic specifically refers to equations whose highest
exponent is 2, it gets a little clumsy to refer to cubic , quartic , and quintic func-
tions for exponents of 3, 4, and 5, respectively. This will get even more confusing
when we use non-integer exponents. Therefore, when I refer to a quadratic
function, please take it to mean simply one with parabolic characteristics.
We can perform numerous manipulations on this base equation to shape it to
our liking and move it to our desired position in the graph space.
S HIFTING THE Q UADRATIC
First, we are likely going to get more use out of the line produced by the quadratic
equation if we can position it in different locations. To move the line vertically, we
must add a value to it in a way similar to what we did with the linear equation
above. In fact, we will term this value b since it performs a similar function to the
y -intercept value of a linear equation. This causes the resulting function to be
Positive values of b move the curve up the graph; negative values move it down.
It is important to note, however, that b is not necessarily going to be the point
 
 
Search WWH ::




Custom Search