Code Sketch


Isha , Aradhya
By: Mulvery Convent School
Category: Art
cleari()
//showAxes()
//showGrid()
setSpeed(superFast)

hop(-70)
def backgroundColor = cm.radialMultipleGradient(
0, 0,
300,
Seq(0,1), 
Seq(yellow, white),
false)
setBackground(backgroundColor)
setPenColor(red)
setFillColor(brown)
right
hop(200)
right()
right(180, 150)
right(120)
left(60, 150)
left(60)
right(120)
left(60, 150)
penUp()
left(-60, 150)
right(60)
penDown()
def diyaColor = cm.radialMultipleGradient(
    0, 0,
    200,
    Seq(0, 0.45,0.9),
    Seq(red,yellow,orange),
    false)

setFillColor(diyaColor)
right(30)
left(59, 140)
left(150)
right(30)
left(59, 140)
left(150)
left(48)
hop(210)
left(45)
hop(160)
right(92)



def pattern{
setFillColor(yellow)
 def sq {repeat(2){
right()
forward(60)
right()
forward(20)
}
 }
 sq
setFillColor(green)

left(26)
forward(50)
right(50)
forward(55)
right(65)
forward(60)
right(68)
forward(55)
right(47)
forward(50)
right(120)
hop(106)
right(35)
hop(30)
setFillColor(yellow)
sq
setFillColor(white)
right(180,30)
hop(60)
right()
hop(30)



setPenThickness(1)
setFillColor(yellow)
repeat(16){
    right(30)
        repeat(8) {
        forward(8)
        right(44
        )
    }
}
left()
hop(70)
left()
hop(15)
right(95)
hop(10)
 def rec {
    repeat(2){
forward(60)
right()
forward(7)
right
}
 }
 rec
 repeat(2){
right()
 hop(20)
 left()
 hop(-2)
 rec
 }
}
pattern
left()
hop(440)
left()
hop(-5)
right(5)
pattern
right()
hop(300)
right()
hop(120)
right(2)
setPenFont(Font("algerian",35))
write("Happy Diwali")