Code Sketch


75th Independence Day
By: Amol naik
Category: Programming
clear()
setPenThickness(5)
setSpeed(medium)
setPosition(0, -20)
setPenColor(red)    
setBackground(white)
zoom(0.7)
setHeading(270)

def boy() {



def curve() {
    repeat(180) {
    right(1)
    forward(1)
    }
}


curve()
forward(20)
forward(-5)
right()
hop(20)
left()

def curve2() {
    repeat(180) {
    right(1)
    forward(0.2)
    }
}


curve2()
left()
hop(30)
left(90)
curve2()
hop(20)
right
hop(50)

def curve3() {
    repeat(180) {
    right(1)
    forward(0.1)
    }
}


right(45)
curve3()
right(45)
hop(45)
left
setPenThickness(3)
circle(15)
setPenThickness(3)
hop(22)
right
hop(15)
curve4()


def curve4() {
    repeat(180) {
    right(1)
    forward(0.3)
    }
}



setPenThickness(5)
left(63)
savePosHe
forward(120)
restorePosHe
forward(30)
left(90)
forward(25)
left(265)
forward(100)
forward(-140)
left(110)
forward(70)
left(80)
forward(15)
left(45,90)
forward(15)
left(85)
forward(70)
left(285)
forward(100)
forward(30)
left(90)
hop(23)
left(83)
forward(130)
forward(-30)
left(90)
forward(32)
left(83)
right()
hop(75)
left(280)
hop(30)
right(210)
forward(50)
right()
forward(55)
right(100)
forward(80)
right(20)
left(120,20)
right(20)
forward(50)
right()
forward(45)
right(85)
forward(96)
forward(-96)
right()
hop(5)
right(55)
setPenThickness(4)
forward(70)
left()
forward(25)
left()
forward(50)
forward(-50)
right()
setFillColor(orange)
curve2()
forward(50)

curve2()
right(15)
forward(15)
right(-30)
forward(10)
hop(170)
left(55)
forward(15)
right(120)
setFillColor(noColor)
forward(50)
left()
forward(30)
left()
forward(60)
forward(-60)
left()
forward(30)
setFillColor(orange)
curve5()

def curve5() {
    repeat(180) {
    left(1)
    forward(0.2)
    }
}

forward(55)
curve5()
left(15)
forward(15)
left(-30)
forward(10)
hop(170)
left(55)

setPenColor(black) 
setFillColor(noColor)
setPenThickness(3)
right(50)
hop(35)
left(310)
left(50,90)
penUp
left(280)
hop(20)
left(-50)
left(50,60)


right()
right(50)
hop(250)
savePosHe
left(50,90)
restorePosHe
left()
setPenThickness(2)
hop(10)
right(90)
left(50,50)
left(40)
hop(240)
right(120)
setPenColor(black)
setPenColor(red)
forward(25)
left(180,5)
right(-5)
forward(15)

left(220)
forward(25)
left(180,5)
right(1)
forward(20)
left(190)
forward(25)
left(180,5)
right(1)
forward(25)

left(200)
forward(25)
left(180,5)
right(-2)
forward(34)
right()

right(20)
forward(15)
left(180,5)
right(-2)
forward(15)
right(125)
hop(259)

setPenThickness(2)
left(240)
forward(15)
left(180,5)
right(1)
forward(15)

left(250)
forward(35)
left(180,5)
right(3)
forward(15)

left(200)
forward(25)
left(180,5)
right(1)
forward(25)
left(220)
forward(25)
left(180,5)
right(1)
forward(30)

left(200)
forward(25)
left(180,5)
right(1)
forward(39)
hop(85)
right(118)
setPenThickness(5)
left(250)
right(120,20)
hop(15)
savePosHe
left(180)
left(100,20)
restorePosHe
right(85)
left(50,90)
left(-50,-20)
right(-25)
hop(68)
right(189)
left(50,70)
right(50)
right(50,50)
left
curve3()
right()
hop(20)
right(25)
left(135,50)
forward(30)
right()
savePosHe
right(50,20)
restorePosHe
left(50,20)
right
hop(200)
right(-14)
hop(50)
}
boy