Code Sketch
Happy Diwali
Category: Art
cleari()
setSpeed(fast)
hop(100)
left()
hop(53)
right()
def rectangle(length:Int, breadth:Int)
{
repeat(2)
{
forward(length)
right()
forward(breadth)
right
}
}
def hexagon()
{
repeat(6)
{
forward(100)
right(60)
}
}
setFillColor(Color(129, 38, 247))
setPenColor(Color(255, 91, 57))
setPenThickness(5)
hop(-380)
left()
hop(120)
right()
rectangle(550,380)
def akashdivo=Picture{
arc(50,-180)
right()
hop(100)
right()
hop(-30)
setFillColor(yellow)
rectangle(30,100)
hop(-3)
right()
setFillColor(green)
hexagon
left()
hop(-200)
setFillColor(yellow)
rectangle(30,100)
right()
setFillColor(orange)
repeat(7)
{
{
rectangle(8,150)
}
hop(15)
}
}
def shape1= Picture{
arc(-60,180)
}thatsFilledWith(red)
def shape2=Picture{
arc(-42,-90)
right(90)
arc(-42,-90)
}thatsFilledWith(yellow)
def pantiRow=picStack(
panti.thatsTranslated(-150,-220),
panti.thatsTranslated(-100,-220),
panti.thatsTranslated(-50,-250),
panti.thatsTranslated(0,-250),
panti.thatsTranslated(50,-250),
panti.thatsTranslated(100,-220),
panti.thatsTranslated(150,-220),
)
def panti= picStack(
shape1,
shape2.thatsRotated(-225).thatsFilledWith(white),
shape2.thatsRotated(-225).thatsTranslated(60,0).thatsFilledWith(white),
shape2.thatsRotated(-135).thatsTranslated(60,0)
).thatsScaled(0.3)
akashdivo.thatsTranslated(-25,150).thatsScaled(0.8).draw
pantiRow.draw
pantiRow.thatsTranslated(0,430).draw
panti.thatsScaled(1.5).thatsTranslated(-5,20).draw
setPosition(-150,-150)
setPenFontSize(30)
setPenColor(white)
write("HAPPY")
setPosition(80,-150)
write("DIWALI")