Game Development Reference
In-Depth Information
Table 10.1 Experiments with Linear Equations
Item
Discussion
y ¼ 2x þ 3
Creates an equation that slopes upward into quadrant I with the y-intercept at 3.
1
2 x þ 3
y ¼
Creates a line that is perpendicular to the line you create with y ¼ 2x þ 3.
1
2 x þ 3
y ¼
Reduces the severity of the slope you generate with y ¼ 2x þ 3.
y ¼2x þ 3
Causes the slope to trail downward from quadrant II to quadrant IV. Passes through
quadrant I from the y-intercept at 3.
y ¼ 2x 3
Moves the y-intercept below the x axis. The line you generate in this way parallels
the line you generate with y ¼ 2x þ 0.
y ¼2x 3
Reverses the slope and places the y-intercept below the x axis.
y ¼ 2x þ 0
Causes the line to cross the origin of the Cartesian system (value of the y-intercept
is 0). The line remains perpendicular to y ¼
1
2 x þ 3.
Refer to Figure 10.1 as you go, and implement this equation in Visual Formula
using the following steps:
1. Click the Value menu item. To position the field the Value menu activates,
click in the top equation composition area. This creates a field for constants
that corresponds to the m constant. This constant defines the slope of
the equation. For the value for the field, click in the box and type 2.
2. Click the Multiply menu item. Then click to place the multiplication
symbol immediately after the Value field.
3. Following the multiplication sign, double-click to create a second Value
field. Type an x in this field. The x represents a range of values you use to
generate the graph of a line.
4. After setting up the Value field for x , click the Add menu item. To place the
plus sign in the equation composition area, click just after the x Value field.
5. Click the Value menu item. Then click in the composition area after the plus
sign to place the Value field for the y-intercept constant. Type 3 in this field.
See the equation composition area of Figure 10.1 for the appearance of the
equation after you have implemented it. To test your work, click the button on
the right of the composition that contains the equal sign. You see 2 in the field
adjacent to it.
Search WWH ::




Custom Search