画一个Android智能手机机器人

画一个Android智能手机机器人,效果如下图

要求:

1.身体颜色为green

2.眼睛直径30

3.天线长度30

4.身体是长方形,长:160,宽:120

5.腿长度43

6.手臂长度65

参考代码

复制代码
import turtle

#头
turtle.color('green')
turtle.forward(160)
x = turtle.xcor()
turtle.setheading(90) #向左旋转90°
turtle.begin_fill()
turtle.circle(x/2, 180) #半圆脑袋
turtle.end_fill()
turtle.penup()
turtle.goto(33,37)
turtle.pendown()
turtle.dot(13,'black') #左眼
turtle.penup()
turtle.goto(126,37)
turtle.pendown()
turtle.dot(13,'black') #右眼
turtle.penup()
turtle.home()
turtle.pendown()

#脑袋左上角天线
turtle.forward(160)
turtle.setheading(90) #向左旋转90°
turtle.circle(x/2,120)
turtle.right(90)
turtle.pensize(5)
turtle.forward(30)

#脑袋右上角天线
turtle.penup()
turtle.home()
turtle.forward(160)
turtle.setheading(90)
turtle.circle(x/2,60)
turtle.right(90)
turtle.pendown()
turtle.forward(30)
turtle.penup()
turtle.home()
turtle.pendown()

#身体
turtle.penup()
turtle.goto(0,-7)
turtle.pendown()
turtle.begin_fill()
turtle.forward(160) #上横线
turtle.right(90)
turtle.forward(120) #右横线
turtle.right(90)
turtle.forward(160) #下横线
turtle.right(90)
turtle.forward(120) #左横线
turtle.end_fill()

#腿
turtle.penup()
turtle.goto(33, -169)
turtle.pendown()
turtle.pensize(32)
turtle.forward(43) #画左腿
turtle.penup()
turtle.goto(130, -169)
turtle.pendown()
turtle.forward(43) #画右腿

#手
turtle.pensize(30)
turtle.penup()
turtle.goto(-18,0)
turtle.pendown()
turtle.right(180)
turtle.forward(65)
turtle.penup()
turtle.goto(179,0)
turtle.pendown()
turtle.forward(65)
相关推荐
海水冷却9 小时前
Android 群组聊天怎么实现:基于 ZIM 的完整落地指南(附可运行 Demo)
android
镭封10 小时前
从视频文案提取到 AI 配音,短视频制作需要哪些工具?
人工智能·智能手机·音视频·语音识别·媒体
新知图书10 小时前
2.2 ROS 2功能包节点编写
人工智能·机器人
数科星球10 小时前
对话气核科技罗世豪:当AI能直接造出实物,下一轮创造革命才刚刚开始
人工智能·机器人
三少爷的鞋11 小时前
现代 Android 架构指南:不要再主动设计 Callback 接口
android
lll235269177912 小时前
线下多人发言对比与录音操作
笔记·智能手机
河图洛水12 小时前
HumanEgo:机器人不模仿人的身体,只复现手与物体的关系
机器人·具身智能·灵巧操作·vla·ego
明志数科12 小时前
产线回流数据的工程价值、三类边界与多源数据配比:机器人进厂常态化下的数据供给分析
机器人·汽车·媒体
光锥智能13 小时前
海康机器人举行2026移动机器人新品发布会:箱式存拣升级,「明智」系列发布
java·前端·机器人
2601_9520477916 小时前
聚水潭售后退仓单同步到金蝶云·星空退货单:轻易云实战教程
大数据·机器人·钉钉·制造