Wednesday, August 8, 2018

Snap! U2L2-Mandala



Circle 1: After the program starts, it initializes the variables vertex and previous position to empty lists. The sprite points to the right and draws the mandala using the polygon block.

Circle 2: The polygon block takes 2 inputs of side and side length. The sprite draws the polygon and each vertex is added to the list of vertices. Then, for each vertex, the sprite will set that current vertex as the previous position. The sprite draws lines by moving to every other vertex while going back to the original vertex each time. This repeats for every vertex to draw the mandala.

No comments:

Post a Comment