找回密码
 立即注册
×

00:00:00

您有一张9.9元限时体验卡,马上领取获得VIP尊享特权。

使用Python画一只鹈鹕

2026-11-17 02:14 来自 小甲鱼 发布@ AI专区

用 turtle 库画一只简笔画鹈鹕,复制运行即可:
import turtle

t = turtle.Turtle()
t.speed(0)
t.pensize(3)

def jump(x, y):
    t.penup()
    t.goto(x, y)
    t.pendown()

# 身体
jump(0, -50)
t.setheading(0)
t.fillcolor("#f6e3b4")
t.begin_fill()
t.circle(85)
t.end_fill()

# 翅膀
jump(-55, -5)
t.setheading(120)
t.fillcolor("#e6c97a")
t.begin_fill()
t.circle(48, 120)
t.left(120)
t.circle(48, 120)
t.end_fill()

# 脖子
jump(30, 40)
t.setheading(90)
t.pencolor("#f6e3b4")
t.pensize(20)
t.circle(-55, 75)
t.pensize(3)
t.pencolor(

Archiver|手机版|小黑屋|鱼C工作室 ( 粤ICP备18085999号-1 )

GMT+8, 2026-11-17 03:14

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

返回顶部