当前位置:网站首页>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 |
边栏推荐
- 软考 系统架构设计师 简明教程 | 总目录
- Knowledge consolidation source code implementation 3: buffer ringbuffer
- Tengine kernel parameters
- Cross domain and jsonp details
- P3500 [POI2010]TES-Intelligence Test(二分&离线)
- 10个 Istio 流量管理 最常用的例子,你知道几个?
- CADD课程学习(8)-- 化合物库虚拟筛选(Virtual Screening)
- CADD课程学习(7)-- 模拟靶点和小分子相互作用 (柔性对接 AutoDock)
- Execution order of scripts bound to game objects
- 我想问一下 按照现在mysql-cdc的设计,全量阶段,如果某一个chunk的binlog回填阶段,
猜你喜欢
随机推荐
cdc 能全量拉去oracle 表嘛
Query the number and size of records in each table in MySQL database
Leetcode32 longest valid bracket (dynamic programming difficult problem)
【HBZ分享】云数据库如何定位慢查询
Crawler notes: improve data collection efficiency! Use of proxy pool and thread pool
Knowledge consolidation source code implementation 3: buffer ringbuffer
[Zhao Yuqiang] deploy kubernetes cluster with binary package
2/13 qaq~~ greed + binary prefix sum + number theory (find the greatest common factor of multiple numbers)
题解:《单词覆盖还原》、《最长连号》、《小玉买文具》、《小玉家的电费》
[leetcode question brushing day 33] 1189 The maximum number of "balloons", 201. The number range is bitwise AND
深入浅出node模板解析错误escape is not a function
tengine 内核参数
Le compte racine de la base de données MySQL ne peut pas se connecter à distance à la solution
Coreldraw2022 new version new function introduction cdr2022
Recommendation | recommendation of 9 psychotherapy books
P2022 interesting numbers (binary & digit DP)
QML和QWidget混合开发(初探)
[face recognition series] | realize automatic makeup
Lambda expression learning
10个 Istio 流量管理 最常用的例子,你知道几个?