Back to Zine Library
Edit on GitHub

Circle or square?

by Bedirhan Ugur

  • beginner
  • p5.js
  • generative art
  • randomness
  • creative coding
Circle or square?

Circle or square? is an eight-panel activity guide for people new to p5.js. Participants open the p5.js editor, create a 600×600 canvas, and use nested for loops to walk a 12×12 grid. In each cell, random() and if/else choose the shape: a yellow circle about 60% of the time, or a green pair of nested squares about 40% of the time. Stroke color and stroke weight also vary at random. The last panel prints the full sketch and three prompts: change the probability, change the grid spacing, and add new shapes. The same zine is available in Turkish (Çember mi, kare mi?), English, and French (Cercle ou carré ?)