Code Sketch


the ROBOT 2.O
By: Suchir G. Prabhudessai
Category: Art
clear()
size(2000, 2000)
visible()
invisible()
setBackground(black)
setSpeed(fast)
def S(n: Int){
    repeat(n) {
        forward(100)
        right(360.0 / n)
    }
}

repeat(4) {
    forward(400)
    right(90)
}
penUp()
changePosition(56, 250)
penDown()
S(4)

penUp()
changePosition(190, 0)
penDown()
S(4)

penUp()
changePosition(30, 150)
penDown()
right(30)
S(3)

penUp()
changePosition(20, 87)
penDown()
right(120)
S(3)

penUp()
changePosition(-170, -87)
penDown()
right(120)
S(3)

penUp()
changePosition(-70, -0)
penDown()
right(120)
S(3)

penUp()
changePosition(220, -350)
penDown()
left(120)
repeat(4){
    forward(150)
    right(90)
}

penUp()
changePosition(-125, 25)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}

penUp()
changePosition(-50, -75)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}

penUp()
changePosition(200, 0)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}
penUp()
changePosition(150, -600)
penDown()
right(90)
repeat(4){
    forward(500)
    right(90)
}
penUp()
changePosition(0, 250)
penDown()
right(90)
repeat(4){
    forward(200)
    right(90)
}

penUp()
changePosition(-700, 200)
penDown()
right(90)
repeat(4){
    forward(200)
    right(90)
}

penUp()
changePosition(0, 0)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}

penUp()
changePosition(0, -200)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}

penUp()
changePosition(-200, 50)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}

penUp()
changePosition(-100, 100)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}

penUp()
changePosition(0, 0)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}

penUp()
changePosition(-100, -100)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}

penUp()
changePosition(-100, 100)
penDown()
right(90)
repeat(4){
    forward(100)
    right(90)
}

penUp()
changePosition(-100, 100)
penDown()
S(4)

penUp()
changePosition(200, 0)
penDown()
S(4)

penUp()
changePosition(1300, -150)
penDown()
S(4)

penUp()
changePosition(0, -100)
penDown()
S(4)

penUp()
changePosition(100, 50)
penDown()
S(4)

penUp()
changePosition(100, 0)
penDown()
S(4)

penUp()
changePosition(100, 0)
penDown()
S(4)
penUp()
changePosition(100, 0)
penDown()
S(4)

penUp()
changePosition(0, 100)
penDown()
S(4)

penUp()
changePosition(-100, 100)
penDown()
S(4)

penUp()
changePosition(200, 0)
penDown()
S(4)

penUp()
changePosition(-1036, -200)
penDown()
S(6)

penUp()
changePosition(87, 50)
penDown()
repeat(12){
    right(30)
repeat(4){
    right(90)
    forward(50)
}
}

penUp()
changePosition(-300, -350)
penDown()
right(90)
repeat(4){
    forward(250)
    right(90)
}
penUp()
changePosition(600, 0)
penDown()
right(90)
repeat(4){
    forward(250)
    right(90)
}

penUp()
changePosition(0, -250)
penDown()
S(4)

penUp()
changePosition(-150, 0)
penDown()
S(4)

penUp()
changePosition(75, -100)
penDown()
S(4)

penUp()
changePosition(0, 200)
penDown()
S(4)

penUp()
changePosition(0, -300)
penDown()
S(4)

penUp()
changePosition(0, -100)
penDown()
S(4)

penUp()
changePosition(0, -100)
penDown()
S(4)

penUp()
changePosition(50, -100)
penDown()
S(4)

penUp()
changePosition(-100, 0)
penDown()
S(4)

penUp()
changePosition(-375, 500)
penDown()
S(4)

penUp()
changePosition(150, 0)
penDown()
S(4)

penUp()
changePosition(-76, 100)
penDown()
S(4)

penUp()
changePosition(1, -200)
penDown()
S(4)

penUp()
changePosition(0, -100)
penDown()
S(4)

penUp()
changePosition(0, -100)
penDown()
S(4)

penUp()
changePosition(0, -100)
penDown()
S(4)

penUp()
changePosition(-50, -100)
penDown()
S(4)

penUp()
changePosition(100, 0)
penDown()
S(4)

penUp()
changePosition(-276, 1150)
penDown()
S(4)

penUp()
changePosition(800, 0)
penDown()
S(4)