A
A
A
A
A
A
A
A
A

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Shape repetitions using loops

Let's use a for loop to draw circles in different arrangements.

At the moment we are using the for loop to draw multiple circles and change their x coordinate. Let's try and change more than one parameter, let's change colors too.

Let's use this same for loop but now instead of changing the position, let's change the radius of our circle, so that we can draw multiple concentric circles. This time we will also change the background color and the fill/stroke style of our circles.

This looks neat, but I would like my circles to not be spaced equally as that makes my composition a little too boring. I would like the distance between the circles to get wider as the circles get bigger. For that I am going to increase the diameter each time, but this time I will make the increase a factor of the golden ratio number which is a constant with a value of 1.618033.

Using loops to create repetition in your visual patterns is an important aspect of algorithmic composition. There's literally a whole world to explore in drawing graphics using loops.

Another interesting technique to learn is using loops in combination with polar coordinates. This allows us to create compositions in which your graphical elements are laid out around circular patterns.