画一个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)
相关推荐
yyuuuzz几秒前
nginx 502 排查,先看上游超时那一行
android·java·运维·nginx·502
feasibility.25 分钟前
399美元桌面机器人Doly:可爱电子宠物+树莓派开源平台,但不能像ChatGPT那样聊天
机器人·开源·嵌入式·树莓派·diy·桌宠
恋猫de小郭4 小时前
Flutter 3.50.0 Release 的第一个崩溃,修好了,还没 hotfix
android·前端·flutter
民乐团扒谱机13 小时前
Rakazo 智能清洁机器人深度评测报告
机器人
feasibility.13 小时前
英伟达把物理AI的3D模型“应用商店”开放了:2575个SimReady仿真资产,总计约472GB,可让agent装配机器人训练场景
人工智能·3d·机器人·仿真·建模·具身智能·英伟达
alexhilton14 小时前
MVI 让屏幕一次只有一个状态
android·kotlin·android jetpack
wangxiaoxuan21718 小时前
机器人软件如何分层:驱动、算法、能力、动作与业务
机器人·科沃斯八界
二流小码农19 小时前
鸿蒙开发:证书只能创建3个,第4个应用怎么办
android·ios·harmonyos
kyle~20 小时前
模型预测控制(MPC)
算法·机器人·控制·传感器
飞Link20 小时前
灵巧手是什么?从机械结构、驱动方式到控制原理,认识机器人的精细操作能力
人工智能·python·机器人