Repository navigation
Description
Title
Circle or square?
Topic
A beginner p5.js activity that uses random() and if/else to fill a grid with circles or nested squares.
Tags
beginner, p5.js, generative art, randomness, creative coding
Language(s)
Turkish, English, French
Creator(s)
Bedirhan Ugur
Creator URL
Short summary
A one-sheet mini-zine that walks beginners through a p5.js sketch: set up a canvas,
build a grid with nested loops, then let random() choose a circle or a nested square.
Full description
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é ?).
Reader-order PDF
Print-ready PDF
Cover image
Additional files
read-bw-tr.pdf
print-bw-tr.pdf
read-bw-fr.pdf
print-bw-fr.pdf
color.zip
Activity type
Self-guided activity; also works as a short workshop or classroom exercise.
Zine format
Single-sheet 8-page folded mini-zine on A4
Duration of the activity
45–60 minutes.
Materials
- A computer with a web browser
- The p5.js Web Editor (editor.p5js.org), or Processing in p5.js mode
- Optional, for the paper zine: a printer, one sheet of A4 paper, and scissors
Preferred attribution
Circle or square? by Bedirhan Ugur, licensed under CC BY-SA 4.0.
Maintainer notes
Three language editions exist (Turkish, English, French).
Reader-order and Print-ready contain the black-and-white, white-background English edition (read-bw-en.pdf, print-bw-en.pdf), recommended for toner-friendly printing.
Additional files: black-and-white Turkish and French editions (read-bw-tr.pdf, print-bw-tr.pdf, read-bw-fr.pdf, print-bw-fr.pdf) and color.zip, containing the full-color reader-order and print-ready PDFs for all three languages (read-en.pdf, print-en.pdf, read-tr.pdf, print-tr.pdf, read-fr.pdf, print-fr.pdf).
Typography: Space Grotesk and JetBrains Mono (SIL Open Font License).
License consent
- I own or have permission to license this material under CC BY-SA 4.0.
Activity
github-actions commentedon Nov 6, 2026
"Circle or square?" is ready for review in #394.
bedirxanugur commentedon Nov 26, 2026
Hi @SableRaf, I've edited this issue with the requested corrections. Only the slug check is still failing:
circle-or-squareis held by review PR #392, which was created for my withdrawn submission #391. Could #392 be closed so this submission can pass the automated checks? Thanks![-]New Zine:[/-][+]New Zine: Circle or square?[/+]SableRaf commentedon Nov 26, 2026
Thanks @bedirxanugur. Your submission has been added!