Code Sketch


gandhi jayanti
By: Aasthajaiswal
Category: Art
clear()
setSpeed(superFast)

def backgroundColor= cm.radialMultipleGradient(
    0, 0, 
    500,
    Seq(0.1,0.5,0.7), 
    Seq(green,white,orange), 
    true)
    setBackground(backgroundColor)
   



def shapes (steps:Long,size:Double,side:Long)
{
    if(steps==0)
    {
        
    }
    else
    {
        forward(size)
        right(360/side)
        shapes(steps-1,size,side)
    }
}

def wheel()
{
setPosition(-220, -50)
setPenColor(cm.hsl(10, 1, 0.1))
setPenThickness(5)

    shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
     shapes(3,100,3)
    right(20)
   
    setPenThickness(10)
    left(175)
    forward(120)
     left(180)
    forward(120)
     right(170)
    forward(120)
    left(-90)
    forward(20)
     left(-90)
    forward(10)
     right(90)
    forward(20)
     left(90)
    forward(30)
     left(0)
    forward(10)
     left(160)
    forward(50)
     left(150)
    forward(20)
     left(60)
    forward(30)
    
    setPosition(-270, -170)
    right(105)
    forward(100)
     right(90)
    forward(10)
     right(90)
    forward(100)
     right(90)
    forward(10)
     right(180)
    forward(28)
     right(-90)
    forward(300)
     right(-90)
    forward(28)
     right(-90)
    forward(50)
     right(-90)
    forward(10)
     right(-90)
    forward(50)
     right(90)
    forward(8)
     right(90)
    forward(300)
     right(180)
    forward(275)
     right(-90)
    forward(80)
    
    setPenThickness(5)
    shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20) 
    shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
     shapes(3,50,3)
    right(20)
    
    setPenThickness(3)
    right(0)
    forward(50)
   right(-65)
   forward(250)
   right(180)
   forward(250)
   right(65)
   forward(95)
   right(95)
   forward(220)
}

wheel

right(140)
hop(350)
left(60)





    setPenColor(black)
right(180,55)
right(180)
right(188,7)
forward(5)
right(44,10)
left(44,10)
right(188,7)
right(180)
forward(20)
right(150,40)
forward(14)
left(180)

right(188,7)
left(44,10)
right(44,10)
forward(2)
right(188,7)
hop(8)
left()
hop(27)
circle(12)
hop(40)
circle(12)
left()
hop(10)
left()
hop(12)
forward(18)
hop(20)
right(23)
forward(30)
hop(-30)
right(155)
hop(60)
left(23)
forward(30)
right(180)
hop(50)
left(63)
hop(10)
right(180,10)
left(152)
forward(15)
left()

left(44,15)
right(25)
forward(10)
left(76)
hop(15)
right(130)
forward(14.7)

right(117)
forward(12)
hop(15)
left()
left(180,9)
right(180)
right(190)
hop(30)

left(70)
hop(6)
right(90)
right(100,12)
     turn(-80)
    right(100,12)
    right(125)

    hop(10)
    dot(8)
right(190)
hop(49)
right(130)
right(100,12)
     turn(-80)
    right(100,12)
    right(125)
hop(10)
dot(8)
 right()
 hop(55)

 right(70)
 hop(5)
 forward(19)
 left(100,45);left(105)
hop(100)
right(80)
hop(5)
 forward(19)
 right(90,50);left(105)
 right( 200)
 hop(400)
 right(60)
 setPenFont(Font("Monospaced", 60,BoldFont))
setPenColor(blue)
setPosition(-290,230)
write("HAPPY")
    setPenColor(blue)
setPosition(-320,160)
write("GANDHI")
setPenColor(blue)
setPosition(50,-140)
write("JAYANTI!")