Code Sketch


Pattern
By: Nitin Mishra
Category: Art
clear()
setSpeed(fast)
zoom(.8)
setBackgroundV(cyan, Color(204, 204, 255))
setPenColor(darkGray)
setPosition(-200, -200)

repeat(6) {
    repeat(3) {
        setFillColor(randomColor)
        forward(50)
        left(45)
        forward(50)
        left(90 + 45)
        forward(50)
        left(45)
        forward(50)
        left(135)
        setFillColor(randomColor)
        forward(50)
        right(45)
        forward(50)
        right(90 + 45)
        forward(50)
        right(45)
        forward(50)
        right(135)
        setFillColor(randomColor)
        right(180)
        hop(-170)
        forward(50)
        left(45)
        forward(50)
        left(90 + 45)
        forward(50)
        left(45)
        forward(50)
        left(135)
        setFillColor(randomColor)
        forward(50)
        right(45)
        forward(50)
        right(90 + 45)
        forward(50)
        right(45)
        forward(50)
        right(135)
        right(180)
    }
    hop(-170 * 3)
    right()
    hop(70)
    left()
}