Game Development Reference
In-Depth Information
More Slopes
In Chapter 6, you investigated the slope-intercept and point-slope equations.
These equations allowed you to become familiar with a number of activities you
can perform to explore relationships between sets of numbers. You can view such
equations as functions. As explained previously, you can view a function as a
formal mechanism for interpreting or transforming the values of a domain into
those of a range.
Making It Easy
When you create a linear equation, you can make use of the point-slope equa-
tion. As the discussion in Chapter 6 indicates, expressed in its entirety, this
equation takes this form:
ðy y
1
Þ¼mðx x
1
Þ
This equation is for a line with slope
m
that contains the point
ðx
1
,
y
1
Þ
. The slope-
intercept equation also uses a slope and a point. The point is called the
y-intercept. The equation appears in one of two forms:
y ¼ mx þ b
Ax þ By ¼ C
Drawing on the discussion in Chapter 6, consider a situation in which you know
the slope of a line is 2. You can then write the following, preliminary equation of
a line:
y ¼
2
x þ b
If you know the coordinates of a point on the line, then you can substitute the
x
and
y
values that define the point into the slope-intercept equation. Assume, for
example, that you are working with the point (4, 11). You can substitute the
x
and
y
values of this point into the standard slope-intercept equation in this way:
11
¼
2
ð
4
Þþb
Having made this substitution, you can then solve for
b
:
11
¼
8
þ b
11
8
¼ b
3
¼ b