Code Sketch


rohit sharma funny
By: Mhalsakant School
// --- Kojo Vector Portrait: Rohit Sharma (Hitman #45) ---
cleari()
setBackground(Color(245, 245, 250)) // ?????? ???? ??????????

// ?. ????? ??? ???? (India Blue & Tri-color Accent)
def drawJersey(): Unit = {
  // ????
  val collar = Picture.fromVertexShape { p =>
    p.beginShape()
    p.vertex(-60, -110)
    p.vertex(0, -145)
    p.vertex(60, -110)
    p.vertex(45, -160)
    p.vertex(-45, -160)
    p.endShape()
  }
  collar.setFillColor(Color(255, 102, 0)) // ????? ???? ?????????
  collar.setPenColor(noColor)
  draw(collar)

  // ????? (Team India Blue)
  val body = Picture.fromVertexShape { p =>
    p.beginShape()
    p.vertex(-110, -220)
    p.vertex(-60, -110)
    p.vertex(60, -110)
    p.vertex(110, -220)
    p.endShape()
  }
  body.setFillColor(Color(10, 80, 180)) // ?????? ???? ?????
  body.setPenColor(noColor)
  draw(body)
}

// ?. ??? ??? ??? (Neck & Ears)
def drawNeckAndEars(): Unit = {
  // ??? (Neck)
  val neck = Picture.fromVertexShape { p =>
    p.beginShape()
    p.vertex(-38, -50)
    p.vertex(38, -50)
    p.vertex(44, -120)
    p.vertex(-44, -120)
    p.endShape()
  }
  neck.setFillColor(Color(190, 130, 90)) // ?????? ????? ???
  neck.setPenColor(noColor)
  draw(neck)

  // ??? (Left & Right Ears)
  val leftEar = Picture.ellipse(15, 23)
  leftEar.setFillColor(Color(220, 155, 115))
  leftEar.setPenColor(noColor)
  leftEar.setPosition(-60, -8)
  draw(leftEar)

  val rightEar = Picture.ellipse(15, 23)
  rightEar.setFillColor(Color(220, 155, 115))
  rightEar.setPenColor(noColor)
  rightEar.setPosition(46, -8)
  draw(rightEar)
}

// ?. ????????? ???? (Rohit's Facial Structure)
def drawFace(): Unit = {
  val face = Picture.fromVertexShape { p =>
    p.beginShape()
    p.vertex(-52, 20)  // ???? ???????
    p.vertex(52, 20)   // ???? ???????
    p.vertex(50, -18)  // ???
    p.vertex(35, -72)  // ?????? ???????
    p.vertex(0, -88)   // ?????? ????
    p.vertex(-35, -72) // ?????? ???????
    p.vertex(-50, -18)
    p.endShape()
  }
  face.setFillColor(Color(225, 158, 118)) // ????? ???
  face.setPenColor(noColor)
  draw(face)
}

// ?. ???? ??? ????? (Eyes & Eyebrows)
def drawEyesAndBrows(): Unit = {
  // ????? (Eyebrows)
  val leftBrow = Picture.fromVertexShape { p =>
    p.beginShape()
    p.vertex(-45, 12)
    p.vertex(-12, 15)
    p.vertex(-10, 7)
    p.vertex(-43, 5)
    p.endShape()
  }
  leftBrow.setFillColor(Color(25, 20, 18))
  leftBrow.setPenColor(noColor)
  draw(leftBrow)

  val rightBrow = Picture.fromVertexShape { p =>
    p.beginShape()
    p.vertex(12, 15)
    p.vertex(45, 12)
    p.vertex(43, 5)
    p.vertex(10, 7)
    p.endShape()
  }
  rightBrow.setFillColor(Color(25, 20, 18))
  rightBrow.setPenColor(noColor)
  draw(rightBrow)

  // ???? (Eyes)
  val leftEye = Picture.ellipse(9, 5)
  leftEye.setFillColor(Color(20, 20, 20))
  leftEye.setPosition(-30, -3)
  draw(leftEye)

  val rightEye = Picture.ellipse(9, 5)
  rightEye.setFillColor(Color(20, 20, 20))
  rightEye.setPosition(20, -3)
  draw(rightEye)
}

// ?. ??? ??? ??????? ?????? (Nose & Beard Style)
def drawNoseAndBeard(): Unit = {
  // ??? (Nose)
  val nose = Picture.fromVertexShape { p =>
    p.beginShape()
    p.vertex(-5, 8)
    p.vertex(5, 8)
    p.vertex(8, -25)
    p.vertex(-8, -25)
    p.endShape()
  }
  nose.setFillColor(Color(205, 138, 98))
  nose.setPenColor(noColor)
  draw(nose)

  // ???? ??? ??? ?????? (Hitman Signature Beard)
  val beard = Picture.fromVertexShape { p =>
    p.beginShape()
    p.vertex(-50, -18)
    p.vertex(-18, -33) // ???? ???????
    p.vertex(0, -36)   // ???? ????
    p.vertex(18, -33)  // ???? ???????
    p.vertex(50, -18)
    p.vertex(42, -63)
    p.vertex(0, -90)   // ???? ??????
    p.vertex(-42, -63)
    p.endShape()
  }
  beard.setFillColor(Color(30, 25, 22)) // ?????? ???
  beard.setPenColor(noColor)
  draw(beard)
}

// ?. ????? ??????? ?????????? (Hairstyle)
def drawHair(): Unit = {
  val hair = Picture.fromVertexShape { p =>
    p.beginShape()
    p.vertex(-55, 15)
    p.vertex(-46, 55)  // ???? ???
    p.vertex(0, 68)    // ??? ????
    p.vertex(46, 55)
    p.vertex(55, 15)
    p.vertex(48, 22)
    p.vertex(0, 25)
    p.vertex(-48, 22)
    p.endShape()
  }
  hair.setFillColor(Color(20, 18, 15))
  hair.setPenColor(noColor)
  draw(hair)
}

// ?. ????? ??????? (Title Banner)
def drawText(): Unit = {
  val name = Picture.text("ROHIT SHARMA", 26)
  name.setPenColor(Color(10, 80, 180))
  name.setPosition(-95, 115)
  draw(name)

  val hitman = Picture.text("HITMAN #45 VECTOR ART", 12)
  hitman.setPenColor(Color(255, 102, 0))
  hitman.setPosition(-80, 90)
  draw(hitman)
}

// ??? ????? ????
drawJersey()
drawNeckAndEars()
drawFace()
drawEyesAndBrows()
drawNoseAndBeard()
drawHair()
drawText()