Code Sketch


Varad, aditya
By: Mulvery Convent School
Category: Art
cleari()
setSpeed(superFast)
def backgroundColour =cm.radialMultipleGradient(
    0, 0, 
    500, 
    Seq(0, 0.5, 0.78), 
    Seq(yellow, orange, pink),
    false) //> def backgroundColour: java.awt.RadialGradientPaint
    
setBackground(backgroundColour)
val c = cm.radialGradient(0, 0,cyan.fadeOut(0.8), 100,
pink.fadeOut(0.4),
true) //> val c: java.awt.RadialGradientPaint = java.awt.RadialGradientPaint@4ffe7c8c
 setPenColor(black)
setFillColor(Color(255, 204, 204))
 right(100)
  hop(10)
   setPenThickness(2)
      repeat(24){
        right(75)
        hop(100)
        repeat(2) {
             right(90, 35)
        right(90)
        }
        right(90, 35)
        repeat(2){
        right(90, 35)
        right(90)
        }
        repeat(2){
            left(90, 35)
        left(90)
        }
        left(180)
        right(90, 35)
        right(90)
         right(90, 35)
       
      }
     left(145)
     hop(250)
     left(134)
hop(-44)
setFillColor(c)
     def design (){
 repeat(3){
forward(110)
right(180)


repeat(11){
    setPenThickness(1)
    right(50)
        repeat(8) {
        forward(5)
        right(44
        )
    }
}
left(100)
hop(25)
dot(6)
hop(19)
right(90)
circle(5)
left(94)
hop(29)
dot(6)
hop(20)
right(110)
circle(5)
left(108)
hop(18)
left()
hop(67)
left()
}
 }
 design()
 left()
 hop(670)
 right()
 hop(-13)

 design()
 hop(60)
 right()
 hop(170)
 right()
setPenFont(Font("Cambria", 30))
 write("Happy Diwali")
 right(230)
 hop(250)
 right(130)
 hop(-50)
 
 setPenFont(Font("Cambria", 15))
 write("Let's celebrate the festival")
 right(180)
 hop(20)
 right(180)
 write(" by spreading joy and light.   ")