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
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). The attached reader-order and
print-ready PDFs are the full-color English edition (read-en.pdf, print-en.pdf).
Additional files include full-color reader-order and print-ready PDFs for Turkish and
French (read-tr.pdf, read-fr.pdf, print-tr.pdf, print-fr.pdf), and bw.zip
containing black-and-white reader-order and print-ready PDFs for all three languages
(read-bw-en.pdf, read-bw-tr.pdf, read-bw-fr.pdf, print-bw-en.pdf, print-bw tr.pdf, print-bw-fr.pdf) for grayscale or non-color printing.
Typography in the PDFs uses 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 5, 2026
"Circle or square?" is ready for review in #392.
SableRaf commentedon Nov 5, 2026
Hello @bedirxanugur and thanks for sharing this. The
bw.zipfile seems invalid. Could you check and update it if possible?Also, may I suggest a version with a white background? This way it can be printed without using so much ink or toner.
bedirxanugur commentedon Nov 5, 2026
Hi @SableRaf — thank you for the feedback.
What went wrong: The
bw.zipin my first submission appears corrupted or unreadable. The six black-and-white PDFs were meant to be inside that archive (EN/TR/FR × reader-order and print-ready).What I’m providing now: In my latest comment I attached all PDFs separately so nothing depends on the zip:
read-bw-en.pdf,read-bw-fr.pdf,read-bw-tr.pdf,print-bw-en.pdf,print-bw-fr.pdf,print-bw-tr.pdfread-en.pdf,read-fr.pdf,read-tr.pdf,print-en.pdf,print-fr.pdf,print-tr.pdfRecommended defaults for the library listing (toner-friendly):
read-bw-en.pdfandprint-bw-en.pdf.Please disregard the old
bw.zip. Happy to update the form entry if that’s easier for your workflow.Thanks again!
print-bw-en.pdf
print-bw-fr.pdf
print-bw-tr.pdf
print-en.pdf
print-fr.pdf
print-tr.pdf
read-bw-en.pdf
read-bw-fr.pdf
read-bw-tr.pdf
read-en.pdf
read-fr.pdf
read-tr.pdf
bedirxanugur commentedon Nov 6, 2026
Update: I’m withdrawing my previous submission in #391 and submitting revised materials here (#393). Please use only the files in this thread / form going forward.
cc @SableRaf
bedirxanugur commentedon Nov 6, 2026