Code Sketch


wall art
By: Sampada Dhupkar
Category: Art
cleari()

val bk = canvasBounds
setBackground(gray)

def sqr(n:Int) = Picture {
    setFillColor(black)
    setPenColor(green)
    setPenThickness(10)
    repeat(4) {
        forward(n)
        right(90)
    }
}

//val pics = picStackCentered(p(50), p(60))

def oct(n:Int) =Picture {
    setFillColor(yellow)
    setPenColor(green)
    setPenThickness(10)
    repeat(8){
        forward(n)
        right(45)
    }
}

def crl = Picture {
    setFillColor(red)
    setPenColor(blue)
    setPenThickness(10)
            right(360,100)
    }

val pics = picStackCentered(sqr(500), oct(160),crl)
draw(pics)