Code Sketch


Artwork with different shapes
By: mary
Category: Art
clear()
setSpeed(superFast)
setBackgroundH(black, blue)
setPenColor(yellow)
setFillColor(red)

//right()
//forward(200)
//left(120)
//forward(200)
//left(120)
//forward(200)

//triangle repeat(3)
//{
//right()
//forward(size)
//left(120)
//}

//right()
//forward(200)
//left(120)
//forward(200)
//left(120)
//forward(200)

//circle(100)
//arc(100,50)
circle(100)
setFillColor(black)
circle(50)
setFillColor(yellow)
circle(20)
//arc(100,50)

setPosition(140, 0)

right()
forward(200)
left(120)
forward(200)
left(120)
forward(200)

setPosition(-220, -20)

def hexagon = {
    repeat(6) {
        forward(100)
        right(60)
    }
}
setFillColor(pink)
hexagon

setPosition(-220, 120)
right(60)
def square = {
    repeat(4) {
        right(90)
        forward(100)

    }
}
setFillColor(green)
square

setPosition(120, -180)

def pentagon = {
    repeat(4) {
        right(72)
        forward(100)

    }
}
setFillColor(white)
pentagon
setPosition(50, -180)
right(72)
def rectangle = {
    repeat(4) {
        forward(100)
        right(90)
        forward(50)
        right(90)

    }
}
setFillColor(white)
rectangle
setPosition(10, 180)

def flowerPattern = {
    repeat(4) {
        setFillColor(white)
        ellipse(50, 20)
        turn(45)
        setFillColor(red)
        ellipse(50, 20)
        turn(45)
    }
}
setFillColor(white)
flowerPattern
setPosition(320, -147)
flowerPattern
setPosition(-265, -188)
flowerPattern