Game Development Reference
In-Depth Information
This equation shifts the parabola to the left on the x axis. Following the path
explored in the previous section, in addition to altering its position on the x axis,
you can invert the parabola. To invert the parabola, you multiply the square of
the difference or sum that characterizes the position of the parabola on the x axis
by negative 1. Here is how you can write this equation so that you both invert the
parabola and shift it to the left:
2
y ¼ 1 ðx þ bÞ
Multiplication by 1 flips the parabola. The vertex opens downward. The
addition of the value associated with b shifts it to the left. In the sections that
follow, you use Visual Formula to explore these and a few other activities.
To the Right
An equation that features the square of the differences of two values allows you to
shift a parabola. As mentioned previously, if the value of b is positive, the
expression ðx bÞ
2 shifts the vertex of the parabola to the right. The top
equation composition area in Figure 10.35 illustrates the implementation of an
equation of this type. The result is the parabola in the Cartesian plane with its
vertex facing upward. On the other hand, the bottom equation composition area
illustrates the implementation of an inverted parabola, which appears below the
x axis in the Cartesian plane. Here are the procedures in Visual Formula for
implementing these equations (refer to Figure 10.35):
1. To implement the equation that reads y ¼ðx 4 Þ
2 , click the Parens menu
item. Then click in the upper equation composition area to position the
parentheses. Pull the parentheses far enough apart to accommodate two
fields and a minus sign.
2. Then click the menu item for Value. To position the field the Value menu
item generates, click just after the opening parenthesis. Type x in the field.
3. Next, click the Subtract menu item. Click after the field inside the
parentheses to position it.
4. Click the Value menu item again. Click inside the parentheses after the minus
sign to position the field the Value menu generates. Type 4 in this field.
5. To create an exponent, click the Power menu item. To position the
Exponent field the Power menu item provides, click to the upper right of the
closing parentheses. In the Exponent field, type 2.
Search WWH ::




Custom Search