Friday 7 July 2017

Drawing Adinkra Symbols using Python - Adinkrahene


Adinkrahene is the symbol for leadership and charisma. This symbol is reportedly the inspiration for the design of the other symbols. Its simple yet abstract design, consisting of three concentric circles emphasizes the importance of ideas and abstract concepts.

In the last section, I mentioned using a grid. To draw this symbol, I have used a simple grid with spacing of 10 pixels each to overlay the Adinkrahene symbol. This image is shown below:


From the above image, we see that the innermost circle is at a radius of 2 squares from the centre of the image. The 2nd circle is 3.25 squares from the centre of the image while the outermost circle is at 4.5 squares from the centre of the image.

This are approximate values. The remaining portions are based off the thickness of the lines used to draw the circles.

Using Turtle Graphics

The first step in attempting to draw the Adinkrahene is to draw the innermost circle and work our way outwards.

Our first task will be to increase the pen size for our turtle. The command to do this is:

turtle.pensize(25)

Next we lift up the pen so that no drawing occurs using this command:

turtle.penup()

The origin of the turtle is at 0, 0. So we need to move its position down to where it is 2 squares away from the center on the y axis. Since our squares for our grid are 50 pixels width, the position will be 100 pixels. The code to do this is shown below:

turtle.setposition(0, -100)

At this point, we place our pendown and draw a circle of radius 100 pixels. This code is now:

turtle.pendown()
turtle.circle(100)

Our Python turtle window will now look like:


To draw the second circle, we have to lift up the pen and move it to the position on the y axis that is 3.25 squares away from the centre. Since the value of the squares are 50 pixels, this value is 162.5. Next we draw a circle of radius 162.5 pixels. The code to do this is shown below:

turtle.penup()
turtle.setposition(0, -162.5)
turtle.pendown()
turtle.circle(162.5)

Our second circle now appears as shown below:


To draw our 3rd circle, all we have to do is to lift the pen, position it on the y axis at 225 pixels, set it down, draw a circle of radius 225.

The code that does this is shown below:

turtle.penup()
turtle.setposition(0, -225)
turtle.pendown()
turtle.circle(225)

The image we are drawing now becomes:


Conclusion

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

Next time, I will look at how to draw another Adinkra symbol. If you have any feedback feel free to reach out to me.

See you next week.

No comments:

Post a Comment