Sitemap

Hwemudua

8 min readDec 30, 2023

--

Hwemudua means “measuring stick”. It is the symbol of examination and quality control.

This symbol stresses the need to strive for the best quality, whether in production of goods or in human endeavors.

Analyzing the Symbol

The symbol basically consists of lines drawn in various positions.

The Plan to Draw the Symbol

The key to drawing this shape is to increase the pen size and place the pen in various locations.

We first draw the line at the bottom then we move to the line at the top.

Next we draw the middle elongated n-shaped line.

Next starting from the left, we draw the remaining lines to complete the shape.

The Algorithm to Draw the Symbol

The algorithm to draw the symbol is given below:

  1. Lift up the pen
  2. Set the pen size to 40
  3. Move the turtle to the position (-160, -170)
  4. Place the pen down
  5. Move forward by 320 pixels
  6. Lift up the pen
  7. Move the turtle to the position (-120, 170)
  8. Place the pen down
  9. Move forward by 240 pixels
  10. Lift up the pen
  11. Move the pen to (-170, -80)
  12. Set the heading to 90 degrees
  13. Place the pen down
  14. Move forward by 130 pixels
  15. Set the heading of the pen to 0 degrees
  16. Move the turtle forward by 340
  17. Set the heading of the pen to 270 degrees
  18. Move the pen 130 pixels forward
  19. Lift up the pen
  20. Move the pen to the position (-80, -170)
  21. Set the heading of the turtle to 90 degrees
  22. Place the pen down
  23. Move the turtle forward by 200 pixels
  24. Lift up the pen
  25. Move the pen to the position (0, -80)
  26. Set the heading of the turtle to 90 degrees
  27. Place the pen down
  28. Move forward by 250 pixels
  29. Lift up the pen
  30. Move the pen to the position (80, -170)
  31. Set the heading of the turtle to 90 degrees
  32. Place the pen down
  33. Move forward by 200 pixels

Using Turtle Graphics

We will use template.py and rename it to hwemudua.py. The first step in the algorithm is to lift up the pen.

The code to do this is shown below:

turtle.penup()

Next we set the pen size to 40 pixels. The code to do this is shown below:

turtle.pensize(40)

Next we move the turtle to the position (-160, -170). The code to do this is shown below:

turtle.setposition(-160, -170)

Now we place the pen down so that we can begin drawing. The code to do this is shown below:

turtle.pendown()

We move the turtle forward by 320 pixels. The code to do this is shown below:

turtle.forward(320)

The generated image is shown below:

Next we draw the line on top. The first step is to lift up the pen. The code to do this is shown below:

turtle.penup()

Next we move the turtle to the position (-120, 170). The code to do this is shown below:

turtle.setposition(-120, 170)

Now we place the pen down. The code to do this is shown below:

turtle.pendown()

We then move forward by 240 pixels. The code to do this is shown below:

turtle.forward(240)

The generated image is shown below:

Now we draw the elongated n shape. It is a composite line so when we place the turtle down we set the heading of the turtle to 90 degrees.

Get Renegade Knight’s stories in your inbox

Join Medium for free to get updates from this writer.

Next we draw the first part and set the heading of the pen to 0 degrees. Then we set the heading of the pen to 270 degrees and we draw the rest of the line.

To start we lift up the pen. The code to do this is shown below:

turtle.penup()

Next we move the pen to the location (-170, -80) the code to do this is given below:

turtle.setposition(-170, -80)

Now we set the heading to 90 degrees. The code to do this is shown below:

turtle.setheading(90)

Then we place the pen down. The code to do this is shown below:

turtle.pendown()

Now we move forward by 130 pixels. The code to do this is shown below:

turtle.forward(130)

The generated image is shown below:

Now we set the heading of the pen to 0 degrees. The code to do this is shown below:

turtle.setheading(0)

Now we move the pen forward by 340 pixels. The code to do this is shown below:

turtle.forward(340)

The generated image is shown below:

Next we set the heading to 270 degrees. The code to do this is shown below:

turtle.setheading(270)

Now to complete the n-shaped symbol, we draw a line of 130 pixels. The code to this is shown below:

turtle.forward(130)

The generated image is shown below:

Now we will draw the horizontal lines starting from the left.

To do this, we lift up the pen. The code for this is shown below:

turtle.penup()

Next we move the turtle to the position (-80, -170). The code to do this is shown below:

turtle.setposition(-80, -170)

Now we set the heading of the pen to 90 degrees. The code to do this is shown below:

turtle.setheading(90)

Now we place the pen down. The code to do this is shown below:

turtle.pendown()

Now we move forward by 200 pixels. The code to do this is shown below:

turtle.forward(200)

The generated image is shown below:

Now we draw the center rod. To start we lift up the pen. The code to do that is shown below:

turtle.penup()

Now we move the pen to the position (0, -80). The code to do this is shown below:

turtle.setposition(0, -80)

Next we set the heading of the turtle to 90 degrees. The code to do this is shown below:

turtle.setheading(90)

Now we place the pen down. The code to do this is shown below:

turtle.pendown()

Now we move 250 pixels. The code to do this is shown below:

turtle.forward(250)

To draw the last line, we lift up the pen. The code to do this is shown below:

turtle.penup()

Next we move the turtle to the position (80, -170). The code to do this is shown below:

turtle.setposition(80, -170)

We then set the heading of the turtle to 90 degrees. The code to do this is shown below:

turtle.setheading(90)

Now we place the pen down. The code to do this is shown below:

turtle.pendown()

Finally we move the pen forward by 200 pixels. The code to do this is shown below:

turtle.forward(200)

The generated image is shown below:

Complete Code

"""
Project Name: Drawing Adinkra Symbols using Python
Symbol Name: Hwemudua
Developer Name: Truston Ailende
Email Address: trustonailende@gmail.com
"""
import turtle
import math

# Square
def drawSquare(length):
turtle.penup()
turtle.setposition(-length/2.0, length/2.0)
turtle.pendown()
for i in range(0, 4):
turtle.forward(length)
turtle.right(90)
turtle.penup()
turtle.home()

# Horizontal lines
def drawHorizontalLine(length, division):
pixelSpace = int(length / division)
half = int(length / 2)
for j in range((-half + pixelSpace), half, pixelSpace):
turtle.penup()
turtle.setposition(-half, j)
turtle.pendown()
turtle.forward(length)
turtle.penup()
turtle.home()

# Vertical lines
def drawVerticalLine(length, division):
pixelSpace = int(length / division)
half = int(length / 2)
turtle.right(90)
for k in range((-half + pixelSpace), half, pixelSpace):
turtle.penup()
turtle.setposition(k, half)
turtle.pendown()
turtle.forward(length)
turtle.penup()
turtle.home()

# Draw the grid
turtle.speed(1000000)
drawSquare(400)
drawHorizontalLine(400, 40)
drawVerticalLine(400, 40)

# Change the colour mode
turtle.colormode(255)

# Change the pencolor to red
turtle.pencolor(255, 0, 0)

# Draw the horizontal centre line
turtle.setposition(-200, 0)
turtle.pendown()
turtle.forward(400)
turtle.penup()

# Draw the vertical centre line
turtle.setposition(0, 200)
turtle.setheading(270)
turtle.pendown()
turtle.forward(400)

# Reset all the properties
turtle.home()
turtle.pencolor(0, 0, 0)

# Place code here
# Lift up the pen
turtle.penup()

# Set the pen size to 40
turtle.pensize(40)

# Move the turtle to the position (-160, -170)
turtle.setposition(-160, -170)

# Place the pen down
turtle.pendown()

# Move forward by 320 pixels
turtle.forward(320)

# Lift up the pen
turtle.penup()

# Move the turtle to the position (-120, 170)
turtle.setposition(-120, 170)

# Place the pen down
turtle.pendown()

# Move forward by 240 pixels
turtle.forward(240)

# Lift up the pen
turtle.penup()

# Move the pen to (-170, -80)
turtle.setposition(-170, -80)

# Set the heading to 90 degrees
turtle.setheading(90)

# Place the pen down
turtle.pendown()

# Move forward by 130 pixels
turtle.forward(130)

# Set the heading of the pen to 0 degrees
turtle.setheading(0)

# Move the turtle forward by 340
turtle.forward(340)

# Set the heading of the pen to 270 degrees
turtle.setheading(270)

# Move the pen 130 pixels forward
turtle.forward(130)

# Lift up the pen
turtle.penup()

# Move the pen to the position (-80, -170)
turtle.setposition(-80, -170)

# Set the heading of the turtle to 90 degrees
turtle.setheading(90)

# Place the pen down
turtle.pendown()

# Move the turtle forward by 200 pixels
turtle.forward(200)

# Lift up the pen
turtle.penup()

# Move the pen to the position (0, -80)
turtle.setposition(0, -80)

# Set the heading of the turtle to 90 degrees
turtle.setheading(90)

# Place the pen down
turtle.pendown()

# Move forward by 250 pixels
turtle.forward(250)

# Lift up the pen
turtle.penup()

# Move the pen to the position (80, -170)
turtle.setposition(80, -170)

# Set the heading of the turtle to 90 degrees
turtle.setheading(90)

# Place the pen down
turtle.pendown()

# Move forward by 200 pixels
turtle.forward(200)

# End the program
turtle.done()

Where it Can be Found

You can find a Hwemudua t-shirt on Amazon.

Summary

At the end of this post, we have successfully used the Python Turtle environment to draw the Hwemudua symbol.

The code for this series is available on GitHub. Please feel free to check it out.

Next time, we will look at the Kete Pa symbol.

--

--

Renegade Knight
Renegade Knight

Written by Renegade Knight

Engineer, Entrepreneur, Educator Passionate about Game Development, Simulation Programming and Robotics.