Game Development Reference
In-Depth Information
You can rewrite this expression so that you replace the variable x with a different
expression. The new expression allows you to view x as the difference or sum of
two other values. Accordingly, you might rewrite the expression in this way:
2
aðx hÞ
Replacing x with x h
You now have a situation in which you are dealing with the square of the
difference of two terms. In this case, h designates a value you can use to translate
the vertex of a parabola along the x axis.
Translating to the Right
As Figure 9.7 shows, when h is a positive number, then the translation is to the
right. On the left of the figure, the value of h is set to 0, so no shift occurs. On the
right, the value is set to 4, so the shift is four units to the right. As you can see
from the figure, if the equation is of the form aðx hÞ
2 , and the constant a is a
positive number, the vertex of the parabola opens upward. The position of the
vertex is defined by the ordered pair ( h , 0). Given this position on the x axis, you
can locate the line of symmetry at the position on the x axis that corresponds to
the value of h . Since a has a positive value, the vertex of the parabola opens up, so
the minimum value of the parabola is 0.
Figure 9.7
A positive value creates a difference of two terms and shifts the vertex to the right.
 
Search WWH ::




Custom Search