In the seventh lesson, we reworked our code into a reusable function. This made it super easy to draw multiple curve stitches, and all we had to do was change the input values in order to create a simple four-pointed-star pattern.
In this lesson we are going to take that function and put it into another for loop. This for loop will repeat the same block of code to automatically vary the angle of rotation to increase by 45 degrees each loop. By running this loop 8 times, we can thereby easily generate an 8-pointed star pattern.
We also positioned our curve stitches at the center of our canvas and made their size equal to half the canvas width.