Game Development Reference
In-Depth Information
Figure 9.10
By setting the values of a, k, and h to positive numbers, you position the parabola so that it opens
upward in quadrant I of the Cartesian plane.
the minimum vertex value. Since
k
is a positive value, the vertex is translated
upward along the
y
axis.
As Figure 9.10 illustrates, since the equation also includes the expression
x
4,
the parabola is shifted to the right along the
x
axis. The vertex lies on the
x
axis,
and the parabola opens up into quadrant I of the Cartesian plane. Note that since
you have shifted the position of the vertex, the parabola intercepts the
y
axis when
y
equals 19.
You achieve a different effect if you employ negative numbers to define the
a
and
h
constants of the quadratic equation. Consider the following equation:
2
2
½x ð
4
Þ
þ
3
This equation unfolds so that the coefficient or slope of
x
is negative. For this
reason, the vertex of the parabola points downward. Since the value of
h
is
negative (-4), you shift the vertex to the left of the
y
axis. While you make the first
two constants negative, you set the value that corresponds
k
to 3. This action, as
in the previous example, translates the vertex upward. As Figure 9.11 illustrates,
the vertex of the parabola lies in quadrant II of the Cartesian plane. The max-
imum value lies at (-4, 3).