当前位置:网站首页>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 |
边栏推荐
- During pycharm debugging, the view is read only and pause the process to use the command line appear on the console input
- Lambda expression learning
- [tomato assistant installation]
- Yyds dry inventory automatic lighting system based on CC2530 (ZigBee)
- 2/11 matrix fast power +dp+ bisection
- Hashlimit rate control
- Solve the compilation problem of "c2001: line breaks in constants"
- [HBZ share] reasons for slow addition and deletion of ArrayList and fast query
- Dry goods collection | Vulkan game engine video tutorial
- flink sql 能同时读多个topic吗。with里怎么写
猜你喜欢
图应用详解
MLAPI系列 - 04 - 网络变量和网络序列化【网络同步】
During pycharm debugging, the view is read only and pause the process to use the command line appear on the console input
IDEA编译JSP页面生成的class文件路径
Class A, B, C networks and subnet masks in IPv4
Easyrecovery靠谱不收费的数据恢复电脑软件
Figure application details
ETCD数据库源码分析——etcdserver bootstrap初始化存储
关于进程、线程、协程、同步、异步、阻塞、非阻塞、并发、并行、串行的理解
Solutions: word coverage restoration, longest serial number, Xiaoyu buys stationery, Xiaoyu's electricity bill
随机推荐
Record an excel xxE vulnerability
Overturn your cognition? The nature of get and post requests
IDEA编译JSP页面生成的class文件路径
MySQL transaction isolation level
Brief tutorial for soft exam system architecture designer | general catalog
Guitar Pro 8.0最详细全面的更新内容及全部功能介绍
One question per day (Mathematics)
Query the number and size of records in each table in MySQL database
The most detailed and comprehensive update content and all functions of guitar pro 8.0
newton interpolation
Sorting out the latest Android interview points in 2022 to help you easily win the offer - attached is the summary of Android intermediate and advanced interview questions in 2022
Coreldraw2022 new version new function introduction cdr2022
Can Flink SQL read multiple topics at the same time. How to write in with
捷码赋能案例:专业培训、技术支撑,多措并举推动毕业生搭建智慧校园毕设系统
1291_ Add timestamp function in xshell log
2327. 知道秘密的人数(递推)
Global and Chinese market of plasma separator 2022-2028: Research Report on technology, participants, trends, market size and share
The global and Chinese market of negative pressure wound therapy unit (npwtu) 2022-2028: Research Report on technology, participants, trends, market size and share
绑定在游戏对象上的脚本的执行顺序
How to realize automatic playback of H5 video