This is the 14th day of my participation in the August More Text Challenge. For details, see: August More Text Challenge

Hello everyone, I am Brother Chen ~

Today is The Chinese Valentine’s Day, first of all in advance to bless partners, happy Chinese Valentine’s Day, no partners, today will find a partner, (to see this sentence you good luck blessing, ha ha ha).

As pythons we have to do something fun and meaningful. In this article use brother turtle library for drawing, if not clear turtle probably use can refer to Calvin before an article (520 valentine’s day | in Python with ‘like’ profession).

At the end of the article, friends can run and modify, take a look at the final figure:

The picture is: the cowherd and weaver meet on the magpie bridge. Here is the drawing process (cowherd and Weaver meet process) :

01 Drawing Process

Here is how to draw this diagram (the code and images involved are shared below).

First define three brushes (T, T2, t3). T is used to draw the bridge and the cowherd. T2 is used to draw the Weaver girl; T3 is used for writing and painting the moon;

Draw the bridge:

In order to render the 3D effect, you need to draw two more similar ones. The effect is as follows:

Add steps to the bridge

Here defines a function method to draw a horizontal line by passing in the starting coordinates of the brush (x, y), the brush left Angle, the brush right Angle, and the length of the drawn line. Change the brush color to gray: Gray

Call the function to draw a step on the bridge. The effect is as follows:

Then he began to draw the Cowherd and the Weaver girl. Due to the limited technology and painting cells of Elder brother Chen, the photo form was adopted here

The Cowherd and the Weaver girl.

Here Chen brother found two pictures as Cowherd and Weaver girl on the Internet, and named them boy1.gif and girl1.gif (since Turtle only supports GIF format pictures, so here Chen brother changed the picture format to GIF)

After adding the image:

To achieve the dynamic effect, move the two images to the center at the same time (adjust position).

Move the Cowherd and Weaver girl from both sides of the bridge to the middle.

Since it is Tanabata Festival, it must be little less than some words to modify.

Text: Tanabata tonight to see the blue sky, petunias weaver across the river bridge

Elder brother Chen remembers the picture of the cowherd and the Weaver maid meeting has a moon. Now that we are here, we must also have the moon.

Again, add an image called yue1.gif

Effect:

And that’s where we’re almost done.

02 Final GIF

Take a look at the GIF at the end to feel the full drawing process.