Sunday, 6 May 2018

Som Onyankopon


Som Onyankopon means "Worship God". It is the symbol of devotion to God.

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


The plan to draw this shape is given below:
  1. Lift up the pen
  2. Set the pensize to 40 pixels
  3. Draw the vertical line at the centre
  4. Draw all the U shaped figures
  5. Draw the horizontal line

Using Turtle Graphics

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

The code for steps 1 and 2 are shown below:

turtle.penup()
turtle.pensize(40)

To draw the vertical line, we move the turtle to the position (0, 160) and move forward by 140 pixels.

The code to do this is shown below:

turtle.setposition(0, 160)
turtle.pendown()
turtle.setheading(270)
turtle.forward(220)

The generated image is shown below:


Working from the bottom, we shall draw the U shaped symbols and then the final horizontal line.

To draw the first U shape, we move the turtle to the position (-40, -80), move 80 pixels, turn to the left by 90 degrees and move another 80 pixels.

The code to do this is shown below:

turtle.penup()
turtle.setposition(-40, -80)
turtle.pendown()
turtle.setheading(270)
turtle.forward(80)
turtle.left(90)
turtle.forward(80)
turtle.left(90)
turtle.forward(80)

The generated image is shown below:


To draw the lower U shaped symbol, we need to move the turtle to the position (-130, 0) and repeat the steps above only that instead of 80 pixels when we turn, we move by 260 pixels.

The code to do this is shown below:

turtle.penup()
turtle.setposition(-130, 0)
turtle.pendown()
turtle.setheading(270)
turtle.forward(80)
turtle.left(90)
turtle.forward(260)
turtle.left(90)
turtle.forward(80)

The generated image is shown below:


To draw the low U shaped symbol, we need to move the turtle to the position (-80, 80) and repeat the steps above only that instead of 80 pixels when we turn, we move by 160 pixels.

The code to do this is shown below:

turtle.penup()
turtle.setposition(-80, 80)
turtle.pendown()
turtle.setheading(270)
turtle.forward(80)
turtle.left(90)
turtle.forward(160)
turtle.left(90)
turtle.forward(80)

The generated image is shown below:


To draw the horizontal line, we move the turtle to the position (-40, 120). Place the pen down, set the orientation of the turtle to 0 degrees and move forward by 80 pixels.

The code to do this is shown below:

turtle.penup()
turtle.setposition(-40, 120)
turtle.pendown()
turtle.setheading(0)
turtle.forward(80)

The generated image is shown below


Conclusion

At the end of this section, we have successfully drawn the Som Onyankopon symbol.
It looks like a catcus tree to me but also like a cathedral.
This post is part of the series: Drawing Adinkra Symbols using Python. The goal is to draw 40 Adinkra symbols using the Python programming language.

No comments:

Post a Comment