Game Development Reference
In-Depth Information
9. Now click the Chart for Formula 1 button. As Figure 10.32 illustrates, a
graph of a linear equation with a positive slope of 2 and a y-intercept of 2
appears in the Cartesian plane.
The Negative Slope
In the previous section, you generated a line with a positive slope. Now com-
plement this work by generating a line with a negative slope. The equation you
work with in this instance assumes the form y ¼mðxÞþb . To implement
this equation, work in the lower equation composition area. Use the following
steps:
1. Click the menu item for Value. Then click in the lower equation compo-
sition area to position the Value field. Type 2 in the Value field. This is the
field that corresponds to the coefficient m . The minus sign establishes a
slope opposite of the one you implemented previously.
2. Click the Multiply menu item. Then click to the right of the Coefficient
field to position the multiplication sign.
3. Click the Value field again, and position the field to the right of the
multiplication sign in the lower equation composition area. Type x in
this field.
4. Click the Add menu item, and position the plus sign to the right of the x field.
5. Click the Value menu item, and then position the Value field after the
plus sign. This is the field for the y-intercept value. As before, type 2 in
the field.
6. Now go to the lower-right panel and find the To and From fields for the
X Range setting beneath the Chart for Formula 2 button. These values should
already be set to correspond with those of the Chart for Formula 1 button, but
to verify that this is so, click the To control and set the value of the field to 10.
Click the From control and set the value of the field to 10.
7. Now click the Chart for Formula 2 button on the right. You can also click
the Chart for Formula 1 button to refresh the previous graph. Graphs of the
equations with slopes 2 and 2 and y-intercept 2 appear in the Cartesian
plane. As Figure 10.32 illustrates, the negative slope slants down to the
right.
Search WWH ::




Custom Search