Thursday, 14 December 2017

Mframadan


Mframadan means "wind resistant house". It is the symbol of symbol of fortitude and readiness to face life's vicissitudes.

This symbol suggests a reinforced or well-built home one built to withstand windy and treacherous conditions. It reflects in Asante history a clause in the unwritten constitutution of the Golden Stool.

Oral acocunts say that according to that clause, mud houses in Kumasi must be reinforced with turf. This reinforcing would cause the house to be sturdier and resistant to unfavorable weather conditions.

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 shown below:

  1. Lift the turtle
  2. Set the pen size to 10
  3. Draw the outer square
  4. Draw the inner square
  5. Draw the diagonal lines
  6. Draw the 4 remaining lines at the bottom
  7. Draw the 4 remaining lines at the top

Using Turtle Graphics

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

The code for steps 1 and 2 is given below:

turtle.penup()
turtle.pensize(15)

The outer square of the symbol is to be drawn first. Thankfully, we have the drawSquare function. Its length is 380 pixels. We use the drawSquare function to draw this shape by entering 380 as a parameter. The code for this is shown below:

drawSquare(380)

The generated image is shown below:


To draw the inner square, we also need to use the drawSquare function. The length of the square is 300 pixels. We use the drawSquare function to draw this shape by entering 300 as a parameter. The code to do this is shown below:

drawSquare(300)

The generated image is shown below:


To draw the diagonals that start at the lower left and move to the right quadrant, we must first get their positions.

To draw the lower line, we must move the turtle to its position and set is heading to 45 degrees. Then we move the turtle forward. The code to do this is shown below:

turtle.setposition(-110, -150)
turtle.setheading(45)
turtle.pendown()
turtle.forward(365)

The generated image is shown below:


Next we draw the upper left lower line. To do this, we move it to a position that is (-150, -110). We set the heading of the turtle to 45 degrees and we draw a line of length 365. The code to do this is shown below:

turtle.penup()
turtle.setposition(-150, -110)
turtle.setheading(45)
turtle.pendown()
turtle.forward(365)

The generated image is shown below:


Now we shall do the same thing for the right lines. The coordinates for the lower right lower line is (110, -150). Now that we know that, we shall repeat the steps we used to draw its counterpart only that its heading will be 135 degrees. The code to do this is shown below:

turtle.penup()
turtle.setposition(110, -150)
turtle.setheading(135)
turtle.pendown()
turtle.forward(365)

We just do the same thing for the upper right lower line. Its coordinates are (150, -110). The code to draw it is given below:



Next we draw the bottom lines. The first bottom line starts at the position (-90, -130) and extends to the position (90, -130). The distance between the lines is 180 pixels. The code for this is shown below:

turtle.penup()
turtle.setposition(-90, -130)
turtle.setheading(0)
turtle.pendown()
turtle.forward(180)

The generated image is shown below:


The coordinates for the second bottom line are at (-70, -110). We need to draw a line of length 140. The code to do this is shown below:

turtle.penup()
turtle.setposition(-70, -110)
turtle.setheading(0)
turtle.pendown()
turtle.forward(140)

The generated image is shown below:


The coordinates for the third bottom line are at (-50, -90). We need to draw a line of length 100. The code to do this is shown below:

turtle.penup()
turtle.setposition(-50, -90)
turtle.setheading(0)
turtle.pendown()
turtle.forward(100)

The generated image is shown below:


The coordinates for the third bottom line are at (-30, -70). We need to draw a line of length 60. The code to do this is shown below:

turtle.penup()
turtle.setposition(-30, -70)
turtle.setheading(0)
turtle.pendown()
turtle.forward(60)

The generated image is shown below:


To draw the four top lines, we only need to reverse the along the y axis. So, the code to draw the four top lines is shown below:

turtle.penup()
turtle.setposition(-90, 130)
turtle.setheading(0)
turtle.pendown()
turtle.forward(180)

turtle.penup()
turtle.setposition(-70, 110)
turtle.setheading(0)
turtle.pendown()
turtle.forward(140)

turtle.penup()
turtle.setposition(-50, 90)
turtle.setheading(0)
turtle.pendown()
turtle.forward(100)

turtle.penup()
turtle.setposition(-30, 70)
turtle.setheading(0)
turtle.pendown()
turtle.forward(60)

The final shape is now shown below:


Conclusion

We have used Python Turtle Graphics to draw the Mframadan symbol. Now that the meaning is clear, I realize that the lines we drew last represents the rafters.

The entire symbol is symbolic of a roof viewed from above.

No comments:

Post a Comment