Code Sketch
geometry shapes
clear()
//showAxes()
def shape1 = Picture{
repeat(4){
forward(100)
right()
}
}
//shape1.draw
def shape2 = Picture{
right(360,50)
}
//shape2.draw
def shape3 = Picture{
repeat(2){
forward(100)
right()
forward(50)
right()
}
}
//shape3.draw
def pattern = picStack(
Picture{},
shape1.thatsRotated(45).thatsTranslated(0, 0)
.thatsFilledWith(red).thatsStrokeColored(red),
shape2.thatsTranslated(-50, 100)
.thatsFilledWith(yellow).thatsStrokeColored(white),
shape3.thatsRotated(90).thatsTranslated(50, 45)
.thatsFilledWith(blue).thatsStrokeColored(noColor)
)
//pattern.draw
def design = picStack(
Picture{},
pattern,
pattern.thatsRotated(90),
pattern.thatsRotated(180),
pattern.thatsRotated(270),
)
//design.draw
def design1 = picStack(
Picture{},
design,
pattern.thatsTranslated(0, 150),
pattern.thatsTranslated(0, 150).thatsRotated(90),
pattern.thatsTranslated(0, 150).thatsRotated(180),
pattern.thatsTranslated(0, 150).thatsRotated(270),
)
design1.draw