Counting Pixels: How Many Squares Does a Diagonal Cross?
Introduction (Motivation):
When drawing a diagonal on a grid, how many squares does it pass through?
This question is key in computer graphics, where images are made of tiny square pixels.
Let’s explore how a diagonal moves through a grid, just like how a computer decides which pixels to light up!
Activity Instruction:
Drag the upper-right corner of the rectangle to change its size.
Count how many squares (highlighted in orange) the diagonal crosses.
Can you find a pattern?