Time for action – turning triangles into pinwheels
We're just a few blocks short of turning our basic shapes into art and patterns. Let's perform the following steps to do so:
- Create another variable called
revs
(short for revolutions). We'll use this as the number of times to repeat our shape. Turn the stage monitor into a slider. - Enclose the repeat (sides) block with a new repeat () block. Add the
revs
variable as the value in this new block. - Add a turn () degrees block after the inner repeat (sides) block. Use the calculation
360
divided byrevs
for the turn value. The final script looks like the following screenshot: - Now things are getting interesting. Set the values for the
sides
,length
,revs
variables as3
,100
, and3
, respectively. Then redraw the shape by changingrevs
to6
,12
, and24
, respectively. The following screenshot shows the pattern:
What just happened?
The revs
variable allows the users to determine how many times to repeat the pattern, but the most...