鱼C论坛

 找回密码
 立即注册
查看: 1213|回复: 7

[见证历程] 绘制皮卡丘

[复制链接]
发表于 2022-9-6 16:52:49 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
import turtle

turtle.pensize(4)
turtle.hideturtle()
turtle.setup(1000, 600)
turtle.speed(10)

# 画鼻子

def nose(color):

    turtle.penup()

    turtle.seth(90)

    turtle.fd(100)

    turtle.pendown()

    turtle.begin_fill()

    turtle.fillcolor(color)

    turtle.seth(45)

    turtle.fd(25)

    turtle.seth(135)

    turtle.circle(25, 95)

    turtle.seth(315)

    turtle.fd(25)

    turtle.end_fill()

# 画眼睛

def eyes():
    turtle.penup()

    turtle.seth(160)

    turtle.fd(250)

    turtle.pendown()

    turtle.begin_fill()

    turtle.fillcolor('black')

    turtle.circle(50)

    turtle.end_fill()

    turtle.penup()

    turtle.circle(50, 60)

    turtle.pendown()

    turtle.begin_fill()

    turtle.fillcolor('white')

    turtle.circle(20)

    turtle.end_fill()

    turtle.penup()

    turtle.seth(-9.5)

    turtle.fd(530)

    turtle.pendown()

    turtle.begin_fill()

    turtle.fillcolor('black')

    turtle.circle(50)

    turtle.end_fill()

    turtle.penup()

    turtle.circle(50, 230)

    turtle.pendown()

    turtle.begin_fill()

    turtle.fillcolor('white')

    turtle.circle(20)

    turtle.end_fill()

# 画脸

def face(size):
    turtle.penup()

    turtle.seth(195)

    turtle.fd(600)

    turtle.pendown()

    turtle.begin_fill()

    turtle.fillcolor('red')

    turtle.circle(size)

    turtle.end_fill()

    turtle.penup()

    turtle.seth(-11)

    turtle.fd(720)

    turtle.pendown()

    turtle.begin_fill()

    turtle.fillcolor('red')

    turtle.circle(size)

    turtle.end_fill()

# 画嘴巴
def mouth(emotion):
    if emotion == "sad":
        turtle.up()
        turtle.goto(100,-100)
        turtle.down()
        turtle.setheading(90)
        turtle.circle(100, 180)

    if emotion == "happy":
        turtle.penup()

        turtle.goto(340, -150)

        turtle.seth(135)

        turtle.fd(250)

        turtle.pendown()

        turtle.seth(-300)

        turtle.circle(30, -65)

        turtle.begin_fill()

        turtle.fillcolor('Firebrick')

        turtle.seth(165)

        turtle.fd(140)

        turtle.seth(195)

        turtle.fd(140)

        turtle.seth(-360)

        turtle.circle(30, -65)

        turtle.penup()

        turtle.seth(-60)

        turtle.circle(30, 65)

        turtle.pendown()

        turtle.seth(-70)

        turtle.fd(240)

        turtle.circle(55, 140)

        turtle.seth(70)

        turtle.fd(240)

        turtle.end_fill()

        turtle.seth(-110)

        turtle.fd(80)

        turtle.begin_fill()
    else:
        pass
#肤色
def skincolour(color):
    turtle.bgcolor(color)

#鼻子
nose("red")
#眼睛
eyes()
#脸颊
face(70)
#嘴巴
mouth("happy")
#皮肤
skincolour("yellow")

turtle.done()

点评

不,我坚决不同意楼主的看法!: 0.0
以后别抄袭了:https://www.jianshu.com/p/cbbcf4bdbd79  发表于 2022-11-28 20:26
不,我坚决不同意楼主的看法!: 0
禁止抄袭!!!  发表于 2022-11-28 18:29

评分

参与人数 3荣誉 -10 鱼币 -10 贡献 -6 收起 理由
liuhongrun2022 -5 -5 -3 转载请注明出处,不要盗版!!
高山 -3 -3 -3 转载请注明出处
元豪 -2 -2 盗版!!!

查看全部评分

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-9-26 16:58:03 | 显示全部楼层
牛X,刚才执行了一下你的程序,RUN后震惊了!!!!原来这就是Python!!!!!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-10-2 11:52:54 | 显示全部楼层
坐标点是怎么确定的
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-10-23 10:55:56 | 显示全部楼层
https://www.jianshu.com/p/cbbcf4bdbd79
盗版!

点评

已经惩罚  发表于 2022-11-28 20:26
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-11-27 20:18:52 | 显示全部楼层
至于吗?把别人的作品搬来说明原创,还不用代码格式?!
过分了吧!

https://www.jianshu.com/p/cbbcf4bdbd79
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-4-27 06:03

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表