Week 2 – Mastering the For-Loop

Published by Tim on Wednesday May 14, 2025

Last modified on June 12th, 2025 at 15:15

Hello and welcome back to week 2 of your Creative Coding Journey! To this point you already had contact with a the most of the fundamental building blocks in any programming language, like functions, variables, loops and conditional statements. This week we will dive deeply into the most fascinating principle in Creative Coding: For-Loops. Loops play a central role in Generative Design, and that’s why we’ll take a closer look at them now. They’re simple to understand but incredibly effective. With just a few lines of code, you can create surprisingly complex visuals.

You’ll explore different distribution techniques and learn how to display elements in linear, circular, random, and grid-based layouts. This week I want you to go through two different video courses. Both are quite short and complementary.

Mastering the For-Loop

Please watch all the lessons in my course Mastering the For-Loop. Make sure you experiment with the code to make sense of the parts parts that a for-loop consists of. I personally used an unconventional technique to make sense how the for loop works and wrote the coe by hand onto a piece of paper. That helped me to zoom into the individual parts that look and confusing in the beginning.

Sketching with Code

This course is a great complement and will teach you how to structure your files to develop an effective sketching process. I recommend watching all the videos, it’s not too long.

This Week’s Prompt

Develop a series of visuals to depict the notion “rhythm”. Try to apply all the different distribution modes and design the output in an interesting way. Then render some interesting images with the saveFrame() function and post your results to the Discord-server in the channel “Journeys”.

Have fun!