Skip to main content
100%

Grid of Circles

✓ Published0🌍 Public
CCurran Kelleher
Last edited Oct 9, 2025
Created on Sep 19, 2019
Forked from Hello Canvas

A grid of 200 circles is drawn across a 960-by-500 canvas, with 20 columns and 10 rows. The circles are evenly spaced by mapping their index positions to normalized coordinates between 0 and 1. Each circle is rendered with a fixed radius of 20 pixels using the Canvas 2D API, specifically `beginPath`, `arc`, and `fill`. The example demonstrates nested `for` loops to generate a regular spatial pattern, with no data source beyond the procedural loop logic.

AI-generated description

A grid of circles, demonstrating for loops.

From "Mathematical Patterns" tutorial given at MIT on July 28, 2013.

MIT Licensed

Similar vizzes