Challenge Level

Take a look at the video below:

*If you can't see the video, click below for a description.*

If I choose the point (5, 5) and draw a line segment joining the point to the origin, my line passes through 5 grid squares.

If I choose the point (4, 3) and draw a line segment joining the point to the origin, my line passes through 6 grid squares.

If I choose the point (6, 4) and draw a line segment joining the point to the origin, my line passes through 8 grid squares.

Draw some line segments of your own, and record how many grid squares each one passes through.

*You may wish to explore this using the GeoGebra applet below.*

**Can you find a relationship between the coordinates of the end of the line segment and the number of squares it passes through?**

If I draw the line segment joining the origin to the point (50, 37) how many grid squares will it pass through?

If I draw the line segment joining the origin to the point (96, 72) how many grid squares will it pass through?

Can you find a line segment that passes through exactly 24 squares?

Can you find more than one?

Can you work out how many grid squares a line segment passes through, if you are given the coordinates of the two endpoints, where neither is at the origin?

*You could also investigate the number of grid lines crossed...*

Working out which grid squares a straight line crosses allows you to create algorithms for drawing straight lines on a computer, where each pixel is a grid square. Read more about line drawing algorithms here.