Python-- with turtle draw a moon cake

  Today is the Mid-Autumn Festival, first of all here wish you a happy Mid-Autumn Festival! So mention Mid-Autumn Festival, our first thought, of course, sweet moon cake, so I draw a moon cake here to give you today.

  Then use the Python draw, we must master the use of Turtle and library, this can be your own online search, you can also click on the link below, which details the function Turtle library, and comes with some simple graphics painting. When I was painting this moon cake also gave me a lot of help. https://blog.csdn.net/zengxiantao1994/article/details/76588580

  Following entered, he began to draw moon cake. First of all, we have to define a coordinate axis to facilitate our drawing.

 

   Then, we need to start painting the outer ring of moon cake, it can be seen as a composition and a small arc.

 

   Look at the results:

 

  Then fill it with "Happy Mid-Autumn Festival!" Congratulatory speech, size and color of the words themselves can also debug.

 

   Finally, let us together draw a small arc of speed, such a simple moon cake to draw better.

 

   The final result:

 

  

   

Guess you like

Origin www.cnblogs.com/Chen-K/p/11517674.html