Categories

# Abusua Pa

Abusua Pa means “Good Family”. It is the symbol of the family unit. Typically in Akan culture, Abusua is the name in Akan culture for a group of people that share common maternal ancestry.

The Abusua line is considered to be passed through the mother’s blood. It is a taboo to marry someone from the same Abusua.

We will use the 5-pixel grid to trace out this image. The image of this is shown below:

## Analysing the Symbol

The symbol is a composite symbol made up of a hollowed out square. The inner part of the square consists of four sections which are lined like a window pane.

The outer part of the square intersects with 4 semi-circles. The widths of all the component shapes are the same.

## The Plan to Draw the Symbol

To draw this symbol, the first task is to increase the pensize to 40 pixels. Next we move the turtle to the position (-100, 100).

We find the distance between (-100, 100) to (100, -100) and use the drawSquare function to draw the outer square.
Next we move to the position (-100, 0) and draw the horizontal centre line. We then move to the position (0, -100) and draw the vertical centre line.

Once we have completed the outer square and its centre lines, we draw the external semi-circles.

Finally, we reduce the pensize to 5 and draw the inner sections of the symbol.

## Algorithm to Draw the Symbol

The algorithm to draw the Abusua Pa symbol is shown below:

1. Lift up the pen
2. Set the pensize to 40 pixels
3. Set the position of the pen to the location (-100, 100)
4. Place the pen down
5. Find the length of the side of the outer square
6. Draw the outer square
7. Draw the inner centre lines
8. Draw the outer semi-circles
9. Reduce the pensize to 5
10. Draw the inner squares

## Using Turtle Graphics

We will use the template.py file and rename it to abusuapa.py.

The code for steps 1 to 4 is given below:

turtle.penup()
turtle.pensize(40)
turtle.setposition(-100, 100)
turtle.pendown()

To find the length between the two points, we use the coordinateDistance function which is shown below:

def coordinateDistance(x1, y1, x2, y2):
dx = x1 – x2
dy = y1 – y2
D = math.sqrt((dx * dx) + (dy * dy))
return D

We calculate the length between the two points using the code shown below:

length = coordinateDistance(-100, -100, 100, -100)

We then draw a square using the drawSquare function.

drawSquare(length)

The generated image is shown below:

I realize that since we are using the drawSquare function, we no longer need the setposition code. We can comment it out.

To draw the center lines, we have to move the turtle to the left-hand side and move forward by the length of the side. Next, we move the turtle to the bottom, set its heading to 90 degrees and move up by the length of the side. The code to do this is shown below:

turtle.setposition(-100, 0)
turtle.pendown()
turtle.forward(length)
turtle.penup()
turtle.setposition(0, -100)
turtle.pendown()
turtle.forward(length)

The generated image is shown below:

To draw the outer circle we will start with the top and move clockwise. To draw the upper circle, we need to move the turtle to the position (50, 120). Then we draw the semi-circle. The code to do this is shown below:

turtle.penup()
turtle.setposition(50, 120)
turtle.pendown()
turtle.circle(50, 180)

The generated image is shown below:

To draw the remaining semi-circles, we move clockwise and also change the heading of our turtle accordingly. The code to do this is shown below:

turtle.penup()
turtle.setposition(120, -50)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(-50, -120)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(-120, 50)
turtle.pendown()
turtle.circle(50, 180)

The generated image is shown below:

Completing this shape is easy. All we have to do is draw the lines that are within the squares. To do this we must reduce the pensize to 5 and set the orientation of the turtle appropriately to draw the lines.

The code below will draw all the vertical lines:

turtle.penup()
turtle.pensize(5)
turtle.setposition(-60, -100)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-40, -100)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(40, -100)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(60, -100)
turtle.pendown()
turtle.forward(length)

The generated image is shown below:

To draw the remaining horizontal lines, I shall start from the bottom of the symbol and work my way up.

The code to do this is shown below:

turtle.penup()
turtle.setposition(-100, -60)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, -40)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, 40)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, 60)
turtle.pendown()
turtle.forward(length)

The generated image is shown below:

## Complete Code

```"""
Project Name: Drawing Adinkra Symbols using Python
Developer Name: Truston Ailende
"""
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
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.pendown()
turtle.forward(400)

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

# Place code here
turtle.penup()
turtle.pensize(40)
turtle.setposition(-100, 100)
turtle.pendown()

def coordinateDistance(x1, y1, x2, y2):
dx = x1 - x2
dy = y1 - y2
D = math.sqrt((dx * dx) + (dy * dy))
return D

length = coordinateDistance(-100, -100, 100, -100)
drawSquare(length)

turtle.setposition(-100, 0)
turtle.pendown()
turtle.forward(length)
turtle.penup()
turtle.setposition(0, -100)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(50, 120)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(120, -50)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(-50, -120)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(-120, 50)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.pensize(5)
turtle.setposition(-60, -100)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-40, -100)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(40, -100)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(60, -100)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, -60)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, -40)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, 40)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, 60)
turtle.pendown()
turtle.forward(length)

# End the program
turtle.done()

```

## Where Can It Be Found?

A brief Google search led to only one significant reference online which is the Abusua Pa Experience.

Abusua Pa Experience is a travel and tour experience company based in Cape Coast, Ghana.

## Summary

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

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

Next time, we will look at the Akoma Ntoaso Adinkra symbol.

## Support this Series Damolasays: