Code Sketch


AASTHA
By: Mulvery Convent School
Category: Art
cleari()
setSpeed(fast)
setPosition(20, 70)
//showAxes()
val c = cm.radialGradient(0, 0,
pink.fadeOut(0.2),
200,
yellow.fadeOut(0.2),
true)
setBackground(c)
def CrossColor = cm.linearGradient( // color making for cross with linear gradient
    6, 1,
    Color(255, 153,153),
   11,0,
   red,
   true)
   setPenColor(red)
   setPenThickness(4)
right(49)
//  to make cross
setFillColor(CrossColor)
repeat(4) { 
repeat(2) {   
   forward(30)
    left()
}
forward(30)
right
}
right(190)
hop(120)
right(120)
setPenColor(black)
setPenFont(Font("Cambria", 20))
write("SAY NO TO CRACKER'S")
left(53)
hop(270)
right(50)
hop(20)
setPenThickness(2)
setFillColor(white)
setPenColor(black)
// shape for upper part decoration
 def shape {
    repeatFor(10 to 52){ p =>
forward (p)
right (92)
}
 }
 shape
right()
hop(90)
left(82)
hop(30)
setPenFont(Font("algerian",16))
write("This Diwali.. make a vow not to burst a single cracker")
right(92)
hop(490)
left()
shape
right(220)
hop(120)
left(218)
hop(-30)
// making asthama part 
repeat(2) {
    setFillColor(cm.hsl(150, 0.72, 0.76))// color making with hsl
forward(100)
right()
forward(150)
right
}
right()
hop(4)
left()
setFillColor(pink)
repeat(2) {
    forward(30)
    right()
    forward(26)
    right
}
right(12)
hop(32)
left(13)
setFillColor(cm.hsl(36, 0.71, 0.77))// color making with hsl
forward(20)
right(53)
forward(29)
right(189,4)
left(12)
forward(12)
left(127,7)
forward(6)
right(138,5)
right(24)
forward(14)
right(102)
hop(32)
right(83)
hop(10)
setFillColor(cm.hsl(196, 0.89, 0.79))// color making with hsl
repeat(2){
forward(19)
right()
forward(12)
right()
}
right(70)
hop(13)
right(17)
forward(20)
left()
forward(25)
left()
forward(10)
left()
forward(14)
right()
forward(8)
right(58)
hop(69)
right(150)
hop(-10)
forward(10)
setFillColor(cm.hsl(38, 0.65, 0.72))// color making with hsl
left(113,5)
right(23)
forward(4)
right(102)
forward(24)
right(49)
forward(14)
left(129,4)
left(42)
forward(12)
right(129,3)
right(45)
forward(10)
left(128,4)
left(42)
forward(10)
right(148,8)
right(24)
forward(19)
left(176,4)
forward(20)
right()
forward(14)
left(94)
forward(50)
left()
forward(98)
left()
forward(35)
hop(-2)
left
hop(37)
dot(9)
right(64)
hop(164)
right(116)
setPenFont(Font("Cambria", 12))
write("The Asthematic people cannot enjoy ")
right(120)
hop(40)
right(240)
write("hiding in their room.")
right(170)
hop(100)
// making wastage bucket due to crakers
val clr = cm.hsl(63, 0.96, 0.78)// color making with hsl
setFillColor(clr)
forward(80)
left(79)
forward(40)
left(78)
forward(80)
left(102)
forward(72)
hop(-20)
left()
hop(34)
circle(15)
setPenColor(red)
setPenThickness(5)
hop(10)
left(124)
hop(5)
forward(26)
right(128)
hop(14)
right(134)
forward(24)
right(25)
hop(25)
var color= red
 def rocket {
    setPenThickness(3)
forward(50)
right(150)
setPenThickness(2)
setPenColor(black)
setFillColor(color)
forward(20)
right(135)
forward(10)
hop(-10)
left(104)
forward(16)
right(94)
forward(10)
right(84)
forward(17)
 }
rocket
 repeat(2) {
 hop(-37)
right(98)
hop(12)
left()
color= color.spin(28)
rocket
 }
 left(152)
 hop(135)
 right(155)
 write("Wastage due to crackers")
 // complete to make a bucket 
 
 left(50)// some details with the sign of cross
 hop(360)
 right(35)
 hop(-46)
 rocket
  
    repeat(2){
 hop(-35)
 right(110)
 hop(7)
 left()
 color= color.spin(-20)
 rocket 
    }
  right(80)
  hop(130)
left(112)
rocket
repeat(2) {
hop(-40)
 right(31)
 hop(8)
 color = color.spin(14)
 rocket
}
// inform about green diwali
right(200)
hop(230)
right(110)
setPenFont(Font("algerian",12))
write("Let this diwali be full of happiness , swetness ")
hop(-20)
write("peace for all to enjoy ..Let's have green")
hop(-20)
write("Diwali full of happiness ..")
hop(-79)
// green diya 

def base=cm.linearGradient(
    0, 0,
    Color(0, 20, 18),
    50, 0,
    green,
    true)
setFillColor(base)


right
hop(200)
right()
right(180,50)
right(120)
left(60,50)
left(60)
right(120)
left(60,50)
penUp()
left(-60,50)
right(60)
penDown()
setFillColor(cm.hsla(58, 0.91, 0.57, 0.91))
repeat(2){
right(30)
left(60,60)
left(150)
}

left(50)
hop(60)
right()
setPenColor(yellow)//making sparks from diya 
setFillColor(cm.hsla(48, 0.99, 0.71, 0.74))// making sparks 
def shape2 {
    repeatFor(rangeTo(0, 8)) { t =>
    repeat(3) {
        forward(t)
        right(50 /3+9* 2
        )
    }
    right(180)
}
}
shape2
right(20)
hop(100)
shape2

right(53)
hop(49)
left(105)
setPenColor(Color(51, 204, 0))
setFillColor(green)
 def leaf(){
        left()//leaf
right(110,7)
forward(12)
right(130)
forward(12)
right(110,7)
right(99)
    }
    leaf
    left(34)
    leaf
    left(99)
    hop(89)
    right(75)
    leaf
    right(55)
    leaf
left(80)
    hop(330)
  right(50)
  // making animal who too get disturb through this
   setPenColor(black)
setFillColor(Color(100, 100, 45))
circle(40)
hop(-10)
left()
hop(20)
right()
setFillColor(white)
circle (22)
left()
hop(22)
right()
hop(10)
dot(8)
right(180)
left(80,17)
right(200)
hop(18)
left(120)
hop(-6)
right(80,17)
right(120)
hop(40)
circle(8)
left(93)
hop(7)
dot(8)
right(189)
hop(15)
circle(8)
left(85)
hop(7)
dot(8)
hop(19)
left(20)
setFillColor(brown)
right(210,16)
forward(10)
right(70)
hop(57)
right(72)
left(210,16)
left(12)
forward(17)
right(32)
hop(80)
right(180)
setPenFont(Font("Cambria", 12))
write("The helpless innocent animal  ")
hop(-15)
write("who are living through hell")
hop(-15)
write("trying to find a place to hide them.")
hop(-170)
// making speaker to show that crackers make a lot sound 
setFillColor(black)
repeat(2) {
    forward(120)
    right()
    forward(80)
    right
}
right(47)
hop(70)
left(25)
hop(25)
setFillColor(Color(153, 153, 153))
circle(24)
hop(-70)
left(109)
right(360,20)
right()
hop(60)
right()
hop(60)
left()
setPenColor(black)
setPenFontSize(15)
setFillColor(white)
write("==")
right()
hop(30)
left(94)
write("Cracker's")
right(240)
hop(130)
right(121)
setPenFontSize(13)
write("Human killing by the sound of cracker's")