Python drawing example: Tai Chi diagram

1. The meaning of Tai Chi diagram

The so-called Tai Chi clarifies the process of the universe from Wuji to Tai Chi, and to the transformation of all things. Among them, Tai Chi refers to the state before heaven and earth were opened and chaos was not divided into yin and yang. A line from the Book of Changes: "This is why the Yi has Tai Chi, which gives birth to two rituals." The two instruments are the Yin and Yang instruments of Tai Chi.

The theory of Tai Chi Schema is the fruitful result of the "Tai Chi" thought of Zhuangzi in Confucianism and Taoism.

Example code

import turtle             #导入turtle库
turtle.speed(10)          # 画笔移动速度
turtle.color('black')     # 设置半边的填充色为黑色
turtle.begin_fill()       # 开始填充
turtle.circle(200,-180)   #画左侧一半大圆 R200
turtle.circle(100,180)    #画中间一半小圆 R100
turtle.circle(-100,180)   #画中间一半小圆 R100
turtle.end_fill()         # 结束填充 上色完成
turtle.circle(-200,-180)  #画右侧一半大圆 R200
turtle.penup()            #让画笔抬起
turtle.goto(0,100)        #将画笔移动到 x:0 y:100的位置上
turtle.pendown()          #让画笔放下
turtle.color('white')     #设置画笔颜色为 白色 white
turtle.dot(40)            #画圆点 size40
turtle.penup()            #让画笔抬起
turtle.goto(0,300)        #将画笔移动到 x:0 y:300的位置上
turtle.pendown()          #让画笔放下
turtle.color('black')     #设置画笔颜色为 黑色 black
turtle.dot(40)            #画圆点 szie40
turtle.done()

operation result

Insert image description here

If you feel that you have gained something, you are welcome to give me a reward———— to encourage me to output more high-quality contentInsert image description here

Guess you like

Origin blog.csdn.net/weixin_40762926/article/details/130238491