Code Sketch


Mahadev
By: Siddhant Salgaonkar
clear()
setSpeed(fast)
setBackgroundV(Color(0, 255, 100), Color(0, 137, 240))
//showAxes()

def eyes=Picture{
    right(45)
    right(90,60)
    right(90)
    right(90,60)
    
}

def eyes3=Picture{
    right(45)
    right(90,60)
    right(110,20)
    right(2)
    right(90,60)
    
}


def eye2=Picture{
     right(45)
    right(90,60)
}

def eyes1=Picture.ellipse(18, 18)

def flower=Picture{
    repeat(5) {
    left(78)
    left(210,20)

    }
}

def line=Picture{
    repeat(2) {
    left()
    left(180,10)
    forward(230)
    right()

    }
}

def nose=Picture{
    right(170)
    right(40,170)
    left(150,10)
    left(60)
    right(170,15)
    left(180,15)
    right(170,15)
     left(60)
    left(150,10)
     right(40,170)
}


def face=Picture{
    forward(-200)
    right(180)
    left(180,160)
    forward(200)
}

def lip=Picture{
    right(50)
    right(80,90)
    right(100)
    right(80,90)
    right(140)
    forward(115)
}

def neck=Picture{
    forward(-200)
    right()
    forward(170)
    left()
    forward(200)
    
}

def hair=Picture.ellipse(45, 60)

def hair1=Picture{
    left(140)
    forward(10)
    left(40,20)
    right()
    forward(10)
    left(160,15)
    right(165)
    forward(10)
    left(160,15)
     right(150)
    forward(10)
    left(160,15)
    right(120)
    left(30,200)
    right(30,200)
     left(30,200)
    right(30,200)
    left(30,200)
    right(30,200)
     left(30,200)
    right(30,200)
    left(135)
    forward(700)
}

def moon=Picture{
    left(130)
    right(140,100)
    right(149)
    left(78,150)
    
}

def ear=Picture{
    forward(120)
    left(80)
    left(160,50)
    right(55)
    left(90,30)
    left(85)
    hop(100)
    left()
    hop(10)
    left(160,30)
}

def earring=Picture{
    right(190)
    right(130,70)
    right(20)
    right(90,70)
    right(80)
    forward(10)
    right(90)
    left(230,40)
    right(0)
}

def Mahadev=picStack(
    Picture{},
    hair1.thatsTranslated(0, 300).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
     hair1.thatsTranslated(-10, 300).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black).withFlippedX,
    neck.thatsTranslated(-75, -150).thatsFilledWith(Color(9, 77, 245)).thatsStrokeColored(black),
    face.thatsTranslated(-150, 125).thatsFilledWith(Color(9, 77, 245)).thatsStrokeColored(black),
    eyes.thatsTranslated(45, 0).thatsFilledWith(white).thatsStrokeColored(black),
    eyes.thatsTranslated(-120,0).thatsFilledWith(white).thatsStrokeColored(black),
    eyes1.thatsTranslated(88, 0).thatsFilledWith(Color(0, 14, 89)).thatsStrokeColored(black),
    eyes1.thatsTranslated(-78, 0).thatsFilledWith(Color(0, 14, 89)).thatsStrokeColored(black),
    nose.thatsRotated(-9).thatsScaled(0.75).thatsStrokeSized(3).thatsTranslated(-6, -10).thatsStrokeColored(black),
    line.thatsTranslated(-105, 60).thatsFilledWith(white).thatsStrokeColored(black),
    line.thatsTranslated(-105, 80).thatsFilledWith(white).thatsStrokeColored(black),
    line.thatsTranslated(-105, 100).thatsFilledWith(white).thatsStrokeColored(black),
    eyes3.thatsTranslated(-110, 30).thatsRotated(-78).thatsFilledWith(red).thatsStrokeColored(black),
    lip.thatsTranslated(-50, -170).thatsFilledWith(Color(255, 133, 183)).thatsStrokeColored(black),
    eye2.thatsTranslated(45, 10).thatsStrokeSized(4).thatsStrokeColored(black),
    eye2.thatsTranslated(-120, 10).thatsStrokeSized(4).thatsStrokeColored(black),
    ear.thatsTranslated(-150, -100).thatsFilledWith(Color(9, 77, 245)).thatsStrokeColored(black),
     ear.thatsTranslated(-170, -100).thatsFilledWith(Color(9, 77, 245)).thatsStrokeColored(black).withFlippedX,
     earring.thatsScaled(0.70).thatsTranslated(-150, -80).thatsFilledWith(Color(255, 233, 8)).thatsStrokeColored(black),
      earring.thatsScaled(0.70).thatsTranslated(-172, -80).thatsFilledWith(Color(255, 233, 8)).thatsStrokeColored(black).withFlippedX,
     hair.thatsTranslated(0, 180).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
    hair.thatsTranslated(0, 175).thatsRotated(20).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
     hair.thatsTranslated(0, 175).thatsRotated(40).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
     hair.thatsTranslated(0, 175).thatsRotated(-20).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
     hair.thatsTranslated(0, 175).thatsRotated(-40).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
       hair.thatsTranslated(0, 175).thatsRotated(-60).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
     hair.thatsTranslated(0, 175).thatsRotated(60).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
     hair.thatsTranslated(-30, 195).thatsScaled(0.90).thatsRotated(-80).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
    hair.thatsTranslated(30, 195).thatsScaled(0.90).thatsRotated(80).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(black),
     moon.thatsTranslated(220, 190).thatsFilledWith(white).thatsStrokeColored(black),
     flower.thatsTranslated(330, 60).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(390, 160).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(310, 280).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-390, -180).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-320, -60).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(420, -90).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(430, 320).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(490, 120).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-430, 120).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-290, 120).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(290, 160).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(500, -230).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-500, 230).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(500, 290).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-300, 290).thatsFilledWith(white).thatsStrokeColored(white),
      flower.thatsTranslated(500, 10).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-370,30).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-450,-40).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-170, 250).thatsFilledWith(white).thatsStrokeColored(white),
     flower.thatsTranslated(-350, 190).thatsFilledWith(white).thatsStrokeColored(white),
     eyes1.thatsTranslated(5, 285).thatsFilledWith(Color(0, 14, 47)).thatsStrokeColored(Color(0, 14, 47)),
)     
Mahadev.thatsScaled(0.75).draw