Game Development Reference
In-Depth Information
Figure 10.23
Inverse values with numbered exponents generate graphs that are symmetrical with respect to the
origin.
Parabolas
When you calculate values for a parabola, you use an exponent of an even value.
The result is a graph that is symmetrical with respect to the
y
axis. A parabola
crosses the
y
axis once, so if you employ an equation of the form
y ¼ x
2
þ c
, the
value of
c
provides a translation value that is also the value of the y-intercept.
As a translation value, the constant
c
moves the graph up or down the
y
axis.
Figure 10.24 provides a few examples of translation.
Each parabola shown in Figure 10.24 represents an equation that includes a
constant for the y-intercept. In the first use of the equation, you can rewrite it as
x
2
þ
0. When the vertex rests on the coordinates (0,0), the y-intercept value is 0.
The other two uses of the equation set the y-intercept at values greater than or
less than zero. The first adds 3. The second explicitly subtracts 3.