Game Development Reference
In-Depth Information
the vertex of the parabola the equation generates opens. A positive value makes it
open upward.
If you change the equation so that the value of the coefficient becomes negative,
then the equation takes on this form: y ¼ð 1 Þx 2 . When you make the coeffi-
cient negative, you change the way the parabola opens. It now opens downward.
To put Visual Formula to work to implement an equation that generates a
parabola that opens upward, you implement the equation that reads y ¼ð 1 Þx 2 .
To accomplish this task, use the following steps:
1. Click the menu item for Value. To position the Value field, click in the upper
equation composition area. Type x in the Value field.
2. Then, to create an exponent, click the Power menu item. To position this
field, click to the upper right of the Value field. After you position the
Exponent field, type 2 in it.
3. To generate the graph of the equation, proceed to the lower-right panel
and click the Chart for Formula 1 button. As illustrated in Figure 10.34,
you see a parabola that opens upward from the x axis.
Figure 10.34 illustrates a second parabola, one that opens downward. You can
express the equation that generates this parabola as y ¼ð 1 Þa 2 . Use these steps
in Visual Formula to implement the equation:
1. Click the menu item for Subtract. Then click in the lower equation com-
position area to position the minus sign that corresponds to the Subtract
menu item.
2. Next, click the Parens menu item. Click after the minus sign to position the
parentheses, and then pull them far enough apart to accommodate a Value field.
3. Click the Value menu item. Click inside the parentheses to place the cor-
responding field. Type x in the Value field.
4. Click the Power menu item. To position the Exponent field, click to the
upper right of the closing parenthesis. After you position the Exponent field,
type 2 in it.
5. To generate the graph, in the lower-right panel of Visual Formula, click the
Chart for Formula 2 button.
Search WWH ::




Custom Search