惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
C
Check Point Blog
Last Week in AI
Last Week in AI
F
Fortinet All Blogs
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG

博客园 - 子墨老师

画一个红色灯笼 画一个哆啦A梦 画一个太极八卦图 画一个Android智能手机机器人 基于Hutool的poi导出excel表格【升级更新】 如何设置wps单元格下拉选项设置 Caused by: org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception ZoomIt的使用与快捷键 springboot项目中使用Java 8的日期时间API 基于springboot系统,如何跟踪会话过期,浏览器会话标识是否收到正常响应,存储,并在后续请求保持携带 SpringBoot+MyBatis实现数据库字段加密 Vue2中能否实现输入中文自动转化为拼音, 且不带音调 Excel导出问题:accessExternalStylesheet 解构赋值+扩展运算符在数组和对象上的应用例子 收藏一下JDK下载地址 介绍几个axios接口请求顺序的问题 vue cli的介绍 Failed to start nginx.service: Unit nginx.service not found. 如何实现文件批量重命名后再进行批量打包下载 如何能成功在centos7下安装nodejs18+以上版本 centos7下卸载nodejs源码包 基于ConcurrentMap锁机制的NFS文件合并方案 基于ConcurrentMap锁机制的NFS分片上传方案 如何将已经存在的本地项目源码关联到远程git仓库中 gitee如何使用 centos7安装php+wordpress
画一个小黄人
子墨老师 · 2026-08-27 · via 博客园 - 子墨老师

image

通过对尺寸绘制图的分析可知,小黄人的外部轮廓由以下几个部分组成

  1. 上半的半圆
  2. 中间的方形
  3. 下半的半圆
  4. 内部上半的眼镜等
  5. 内部下半的吊带裤及口袋等
  6. 以及各部分的着色方法

image

import turtle

#轮廓
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.penup()
turtle.goto(150,150)
turtle.pendown()
turtle.left(90)
turtle.circle(150,180)
turtle.forward(300)
turtle.circle(150,180)
turtle.forward(300)
turtle.end_fill()

#右边眼睛框
turtle.pensize(10)
turtle.left(90)
turtle.forward(70)

#左边眼睛框
turtle.penup()
turtle.goto(-80, 150)
turtle.pendown()
turtle.forward(70)

#左边眼睛
turtle.fillcolor('white')
turtle.begin_fill()
turtle.penup()
turtle.goto(0,150)
turtle.pendown()
turtle.pensize(5)
turtle.right(90)
turtle.circle(40,360)
#右边眼睛
turtle.penup()
turtle.goto(80,150)
turtle.pendown()
turtle.circle(40,360)
turtle.end_fill()

#左边瞳孔黑
turtle.penup()
turtle.goto((-55,150))
turtle.pendown()
turtle.dot(40)
#右边瞳孔黑
turtle.penup()
turtle.goto((25,150))
turtle.pendown()
turtle.dot(40)


#左边瞳孔白
turtle.up()
turtle.goto((-45,150))
turtle.down()
turtle.pencolor('white')
turtle.dot(16)
#右边瞳孔白
turtle.up()
turtle.goto((35,150))
turtle.down()
turtle.dot(16)

#嘴巴
turtle.penup()
turtle.goto((-50,50))
turtle.pendown()
turtle.pencolor('red')
turtle.seth(-60)
turtle.circle(70,120)

#底部裤兜
turtle.fillcolor('#004B97')
turtle.begin_fill()

turtle.penup()
turtle.goto((150,-160))
turtle.pendown()
turtle.pencolor('black')

turtle.seth(180)
turtle.width(1)
turtle.forward(50)
turtle.seth(90)
turtle.forward(60)
turtle.seth(180)
turtle.forward(200)
turtle.seth(-90)
turtle.forward(60)
turtle.seth(180)
turtle.forward(50)

turtle.seth(-90)
turtle.circle(150,180)

turtle.end_fill()

#右肩带
turtle.fillcolor('#004B97')
turtle.begin_fill()

turtle.penup()
turtle.goto((150,-35))
turtle.pendown()
turtle.seth(-90)
turtle.forward(15)
turtle.goto((100,-110))
turtle.goto((90,-100))
turtle.goto((150,-35))

turtle.end_fill()

#左侧肩带
turtle.fillcolor('#004B97')
turtle.begin_fill()

turtle.penup()
turtle.goto((-150,-35))
turtle.pendown()
turtle.seth(-90)
turtle.forward(15)
turtle.goto((-100,-110))
turtle.goto((-90,-100))
turtle.goto((-150,-35))

turtle.end_fill()

#口袋
turtle.width(4)
turtle.penup()
turtle.goto((50,-170))
turtle.pendown()
turtle.goto((50,-150))
turtle.goto((-50,-150))
turtle.goto((-50,-170))
turtle.seth(-90)
turtle.circle(50,180)