python-3.x - 是否可以在不使用乌龟的情况下在 python 中绘制动画徽标或螺旋?
问题描述
我想使用 python 代码绘制动画图或徽标,但不使用海龟。可能使用其他软件包为情节的片段设置动画。你能帮我为下面的图像制作动画吗?
from turtle import Screen, Turtle
RADIUS = 100
screen = Screen()
screen.colormode(255)
turtle = Turtle(visible=False)
turtle.speed('fastest') # because I have no patience
turtle.penup() # we'll use fill instead of lines
turtle.color(20, 191, 150) # greenish color
turtle.sety(-RADIUS) # center hexagon
turtle.begin_fill()
turtle.circle(RADIUS, steps=6) # draw hexagon
turtle.end_fill()
turtle.color('white') # interior color
turtle.sety(2 * RADIUS / 11) # position circle (head)
turtle.begin_fill()
turtle.circle(2 * RADIUS / 9) # draw circle (head)
turtle.end_fill()
turtle.forward(5 * RADIUS / 8)
turtle.right(85)
turtle.begin_fill()
turtle.circle(-13 * RADIUS / 20, 190)
turtle.right(85)
turtle.circle(-13 * RADIUS / 20, 90)
turtle.left(180)
turtle.circle(-13 * RADIUS / 20, 90)
turtle.end_fill()
screen.exitonclick()
以上代码由@cdlane 提供
解决方案
推荐阅读
- amazon-web-services - EMR Hive ODBC 连接错误:HiveSQLException:预期状态:[已完成],但发现 RUNNING
- oracle - Popup LOV 或 Retutn P_Iten(如果 P_tem 在 Popup LOV 列表中)
- php - Nginx 全新的 codeigniter 安装在尝试访问控制器时显示 404 Not Found
- karate - 如何使用 TestNG 运行空手道测试运行程序文件?
- angular - 如何使用带电容器的 angular ionic 4 像 TIKTOK APP 一样全屏显示图像和视频
- c# - 表单最大化后如何修复控件位置
- linux - 如何从在 Linux 上运行的 .NET Core 应用程序对 Windows 域用户进行身份验证
- python - 如何成功编译 python 3.x
- sql - 在删除语句postgresql中使用partition by子句
- python - 如果满足条件,则获取列表列表的最大元素