Code Sketch


Kavlo by curve
By: Archana Shashank Hudekar
clear
//showAxes()
//showGrid()
setBackgroundV(Color(168, 151, 23), Color(51, 253, 204, 116))
playMp3Sound("http://www.crowbusters.com/sounds/crowowl.mp3")
def kavlo = Picture.fromPath {
    x=>
        x.moveTo(0,0)
        x.arc(-135,68,120)
        x.moveTo(0,0)
        x.arc(135, 68, -120)
}.thatsStrokeColored(red).thatsStrokeSized(10)

def kavle(count:Long):Picture=
    if (count == 1){
        kavlo
    } else {
        def iHave = kavlo
        def giveMe = kavle(count -1)
        picStack(
            iHave, 
            giveMe
            .thatsScaled(0.6)
            .thatsTranslated(100,125)
            )
    }

    kavle(10).thatsRotated(-10)
            .thatsFilledWith(white).draw