当前位置:网站首页>Complete list of common functions of turtle module
Complete list of common functions of turtle module
2022-07-06 04:26:00 【Michael. py】
For the convenience of study , This article will turtle Summary of common functions and methods in the Library :
command | explain |
---|---|
turtle.forward(distance) or turtle.fd(distance) | Move towards the current brush distance Pixel length |
turtle.backward(distance) or turtle.bw(distance) | Move in the opposite direction of the current brush distance Pixel length |
turtle.right(degree) | Move clockwise degree angle |
turtle.left(degree) | Move counterclockwise degree angle |
turtle.penup() | Lift the pen and move , No graphics , For another place to draw |
turtle.pendown() | The paintbrush falls , Draw a picture when moving , By default, it is also drawing graphics |
turtle.goto(x, y) | Move the brush to the coordinates (x, y) The location of |
turtle.circle() | A circle |
setx() | Will the current x The axis moves to the specified position |
sety() | Will the current y The axis moves to the specified position |
setheading(angle) or seth(angle) | Set the current orientation to angle angle |
home() | Set the current brush position to the origin , Towards the East |
dot() | Draw a dot of a specified diameter and color |
turtle.fillcolor(colorstring) | The fill color of the drawing |
turtle.color(color1, color2) | Simultaneous setting pencolor = colorl,fillcolor=color2 |
turtle.filling() | Returns whether or not the current filling state |
turtle.begin_fill() | Ready to start filling in figures |
turtle.end_fill() | Filling complete |
turtle.hideturtle() | Hide the brush turrle shape |
turtle.showturtle() | Showing the brush turtle shape |
turtle.mainloop() or turtle.done() | Start event cycle one call Tkinter Of mainloop function , It must be the last statement in the turtle graphics program |
turtle.mode(mode=None) | Set tortoise mode (“standard” “logo” or “world”) And perform a reset , If no mode is given , Then return to the current mode |
turtle.delay(delay=None) | Sets or returns the plot delay in milliseconds |
turtle.begin_poly() | Start recording the vertices of the polygon , The current tortoise position is the first vertex of the polygon |
turtle.end_poly() | Stop recording polygon vertices , The current tortoise position is the last vertex of the polygon , Will be connected to the first vertex |
边栏推荐
- Lagrange polynomial
- ETCD数据库源码分析——etcdserver bootstrap初始化存储
- Brief tutorial for soft exam system architecture designer | general catalog
- 2/10 parallel search set +bfs+dfs+ shortest path +spfa queue optimization
- 食品行业仓储条码管理系统解决方案
- The global and Chinese market of negative pressure wound therapy unit (npwtu) 2022-2028: Research Report on technology, participants, trends, market size and share
- The implementation of the maize negotiable digital warehouse receipt standard will speed up the asset digitization process of the industry
- Yyds dry goods inventory web components series (VII) -- life cycle of custom components
- Mlapi series - 04 - network variables and network serialization [network synchronization]
- Comprehensive ability evaluation system
猜你喜欢
Introduction to hashtable
CADD课程学习(8)-- 化合物库虚拟筛选(Virtual Screening)
Solution to the problem that the root account of MySQL database cannot be logged in remotely
Solve the compilation problem of "c2001: line breaks in constants"
One question per day (Mathematics)
食品行业仓储条码管理系统解决方案
View workflow
Yyds dry inventory automatic lighting system based on CC2530 (ZigBee)
Fundamentals of SQL database operation
10个 Istio 流量管理 最常用的例子,你知道几个?
随机推荐
VPP performance test
10個 Istio 流量管理 最常用的例子,你知道幾個?
How does computer nail adjust sound
[HBZ share] reasons for slow addition and deletion of ArrayList and fast query
Stable Huawei micro certification, stable Huawei cloud database service practice
R note prophet
解决“C2001:常量中有换行符“编译问题
Global and Chinese markets for endoscopic drying storage cabinets 2022-2028: Research Report on technology, participants, trends, market size and share
[Zhao Yuqiang] deploy kubernetes cluster with binary package
SharedPreferences source code analysis
Global and Chinese markets for MRI safe implants 2022-2028: technology, participants, trends, market size and share Research Report
Query the number and size of records in each table in MySQL database
[leetcode question brushing day 33] 1189 The maximum number of "balloons", 201. The number range is bitwise AND
[network] channel attention network and spatial attention network
P2022 有趣的数(二分&数位dp)
Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?
Understanding of processes, threads, coroutines, synchronization, asynchrony, blocking, non blocking, concurrency, parallelism, and serialization
Fundamentals of SQL database operation
Global and Chinese markets for medical gas manifolds 2022-2028: Research Report on technology, participants, trends, market size and share
[Zhao Yuqiang] deploy kubernetes cluster with binary package