Much Islamic art applies principles of geometry and repeats simple patterns to form complex forms. For example, the Egyptian Motif above has six overlapping rectangles.
In this project, you will learn how to extend your pinwheel
code from Unit 1 to create such intricate patterns.
rectangle
block. pen down
and pen up
blocks inside the rectangle definition. We don't normally do this but here this is done to simplify the more complex code coming ahead. This will ensure that once a rectangle is drawn, the pen is up and you don’t need to worry about unintended scribbles as your drawing sprite continues moving to execute the rest of the code.pinwheel
code you have written in Unit 1.pinwheel with rectangles
block. It will have two more inputs width and length for the width and length of the rectangles.pinwheel
code except that it has the rectangle
block inserted in between the two move
blocks that created the pinwheel branches. when green flag clicked
blockVariable | Minimum | Maximum |
---|---|---|
number of branches | 3 | 36 |
size | 0 | 100 |
backup | 0 | 100 |
width | 0 | 150 |
length | 0 | 150 |
forever
block.warp
block makes sure that the pinwheel with rectangles
is drawn all at once rather than step by step.warp
block in the forever loop and inserting into the pinwheel with rectangles
code.