当前位置:网站首页>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 |
边栏推荐
- [network] channel attention network and spatial attention network
- P3500 [POI2010]TES-Intelligence Test(二分&离线)
- BOM - location, history, pop-up box, timing
- Global and Chinese markets for fire resistant conveyor belts 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese markets for patent hole oval devices 2022-2028: Research Report on technology, participants, trends, market size and share
- Easyrecovery靠谱不收费的数据恢复电脑软件
- P2022 interesting numbers (binary & digit DP)
- [HBZ share] reasons for slow addition and deletion of ArrayList and fast query
- The implementation of the maize negotiable digital warehouse receipt standard will speed up the asset digitization process of the industry
- Guitar Pro 8.0最详细全面的更新内容及全部功能介绍
猜你喜欢
Yyds dry goods inventory hcie security Day11: preliminary study of firewall dual machine hot standby and vgmp concepts
Easyrecovery reliable and toll free data recovery computer software
The value of two date types is subtracted and converted to seconds
Dry goods collection | Vulkan game engine video tutorial
Mysql数据库慢sql抓取与分析
How does computer nail adjust sound
coreldraw2022新版本新功能介绍cdr2022
Easyrecovery靠谱不收费的数据恢复电脑软件
Meet diverse needs: jetmade creates three one-stop development packages to help efficient development
Mysql database storage engine
随机推荐
P2022 interesting numbers (binary & digit DP)
Cross domain and jsonp details
CADD课程学习(7)-- 模拟靶点和小分子相互作用 (柔性对接 AutoDock)
How to realize automatic playback of H5 video
MySQL learning record 13 database connection pool, pooling technology, DBCP, c3p0
hashlimit速率控制
Deep learning framework installation (tensorflow & pytorch & paddlepaddle)
About some basic DP -- those things about coins (the basic introduction of DP)
【HBZ分享】云数据库如何定位慢查询
lora网关以太网传输
颠覆你的认知?get和post请求的本质
Sentinel sliding window traffic statistics
POI add border
About some basic DP -- those things about coins (the basic introduction of DP)
Implementation of knowledge consolidation source code 1: epoll implementation of TCP server
Coreldraw2022 new version new function introduction cdr2022
VPP性能测试
牛顿插值法
Fundamentals of SQL database operation
图应用详解