Game Development Reference
In-Depth Information
In both instances, after you calculate the slope of the line, you can use the slope to
calculate other coordinates.
When you work with the y-intercept, the first coordinate that defines the
intercept is 0, which establishes the value of the run ( x ). The second coordinate
establishes the value of the y-intercept. Here is a representative equation con-
taining a y-intercept:
y ¼ 2 x þ 3
Given this equation, you know that the line generated includes one coordinate
pair in which x equals 0 and y equals 3.
As Figure 6.10 illustrates, using the y-intercept as a starting point, you can use the
slope information to determine new points. The slope is 2. If you move to the
right by 1 unit along the x axis, you know that you move upward by 2 units on
Figure 6.10
The slope and y-intercept allow you to generate points on the line.
 
Search WWH ::




Custom Search