找回密码
 立即注册
×

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(

使用HTML画一只鹈鹕

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

下面用 SVG 在 HTML 中画一只鹈鹕,保存为 pelican.html 后双击打开即可看到效果。




HTML画鹈鹕

  body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f4ff;
  }
  svg {
    width: 360px;
    height: auto;
  }




  
  

  
  
  

  
  
  

  
  

  
  

  
  

  
  

  
  
  

  
  

  
  

  
  




请使用Python画出一只正在踩单车的鹈鹕

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

我将使用Python的turtle模块绘制简笔画风格的踩单车鹈鹕。这是一个创意性的视觉简化方案:


import turtle

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

# 绘制单车主体
t.penup()
t.goto(-50, -120)
t.pendown()
# 车架三角形
t.goto(0, 0)
t.goto(50, -120)
t.goto(-50, -120)
# 座位
t.penup()
t.goto(0, 0)
t.pendown()
t.goto(0, 30)
# 车把手
t.penup()
t.goto(0, 0)
t.pendown()
t.goto(-40, 40)
t.penup()
t.goto(-40, 30)
t.pendown()
t.goto(-40, 50)

# 绘制车轮
def draw_wheel(x, y):
    t.penup()
    t.goto(x, y - 30)
    t.pendown()
    t.circle(30, extent=360)
    # 车轮

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

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

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

返回顶部