Grid of Circles
✓ Published0🌍 Public
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 descriptionA grid of circles, demonstrating for loops.
From "Mathematical Patterns" tutorial given at MIT on July 28, 2013.
MIT Licensed