### Walking the line

Computers draw lines and circles during many common tasks, such as using an image editor. But how does a computer know which pixels to darken to make a line?

This activity shows how difficult it is for a computer to do something as simple as drawing a straight line or a circle, and shows a clever way (Bresenham’s algorithm) to do it quickly.

This exercise was developed by Joshua Scott (University of Canterbury).

### Downloads

### Curriculum Links

##### Great Principles of Computer Science

- Computation, recollection

##### ACM K12 Curriculum

Expand- Level I (Grades 6-8) Topic 9: Demonstrate an understanding of concepts underlying hardware, software, algorithms, and their practical applications.

##### New Zealand Curriculum

Expand- Mathematics Level 1: Shape
- Identify and describe the plane shapes found in objects

- Mathematics Level 3: Patterns and relationships
- Connect members of sequential patterns with their ordinal position and use tables, graphs, and diagrams to find relationships between successive elements of number and spatial patterns