当前位置:网站首页>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 |
边栏推荐
- 满足多元需求:捷码打造3大一站式开发套餐,助力高效开发
- Lombok principle and the pit of ⽤ @data and @builder at the same time
- POI add border
- 食品行业仓储条码管理系统解决方案
- How do programmers teach their bosses to do things in one sentence? "I'm off duty first. You have to work harder."
- 729. 我的日程安排表 I(set or 动态开点线段树)
- P3033 [usaco11nov]cow steelchase g (similar to minimum path coverage)
- 综合能力测评系统
- 【HBZ分享】ArrayList的增删慢查询快的原因
- Lora gateway Ethernet transmission
猜你喜欢

Fundamentals of SQL database operation

Solutions: word coverage restoration, longest serial number, Xiaoyu buys stationery, Xiaoyu's electricity bill

MySQL learning record 13 database connection pool, pooling technology, DBCP, c3p0

Practical development of member management applet 06 introduction to life cycle function and user-defined method

10個 Istio 流量管理 最常用的例子,你知道幾個?

电脑钉钉怎么调整声音

Yyds dry goods inventory hcie security Day11: preliminary study of firewall dual machine hot standby and vgmp concepts

解决“C2001:常量中有换行符“编译问题

The implementation of the maize negotiable digital warehouse receipt standard will speed up the asset digitization process of the industry

Le compte racine de la base de données MySQL ne peut pas se connecter à distance à la solution
随机推荐
Case of Jiecode empowerment: professional training, technical support, and multiple measures to promote graduates to build smart campus completion system
HotSpot VM
How to solve the problem of slow downloading from foreign NPM official servers—— Teach you two ways to switch to Taobao NPM image server
Global and Chinese markets for fire resistant conveyor belts 2022-2028: Research Report on technology, participants, trends, market size and share
图应用详解
[Zhao Yuqiang] deploy kubernetes cluster with binary package
About some basic DP -- those things about coins (the basic introduction of DP)
How to execute an SQL statement in MySQL
View 工作流程
拉格朗日插值法
Patent | subject classification method based on graph convolution neural network fusion of multiple human brain maps
VPP performance test
ETCD数据库源码分析——etcdserver bootstrap初始化存储
P2022 interesting numbers (binary & digit DP)
[disassembly] a visual air fryer. By the way, analyze the internal circuit
CADD课程学习(8)-- 化合物库虚拟筛选(Virtual Screening)
Script lifecycle
Class A, B, C networks and subnet masks in IPv4
Fedora/REHL 安装 semanage
View workflow