Game Development Reference
In-Depth Information
where the line crosses the y -axis. If we move the parabola horizontally, the same
function will cross the y -axis in a different place. Therefore, it is better to think of
b in terms of shifting the vertex of the parabola up or down by b . That is, if b = 5,
then the vertex will be at y = 5 regardless of what the x value is.
To shift the vertex (and the entire parabola) horizontally, we subtract the value
from x before raising it to the exponent. In keeping with the terminology estab-
lished above, we will term this value c (although it is not necessarily the x -intercept).
The equation for this is
If we set c = 5, the curve is shifted to the right by five units. Therefore, the vertex
would be located at the point (5, 0).
Combining the two adjustments into one equation, we would arrive at
By using this formula, we can generate a simple parabola with a vertex at the
point ( c , b ). We can see three examples of shifted parabolas in Figure 10.2.
FIGURE 10.2 Three examples of quadratic functions of the form y = ( x - c ) 2 + b .
The value of b shifts the curve vertically, and c shifts it horizontally.
The vertex of the parabola is located at ( c , b ).
Search WWH ::




Custom Search