zoukankan      html  css  js  c++  java
  • 20190823 turtle 画鹅

    turtle 画鹅

    import turtle
    t=turtle
    turtle.speed(10)
    t. setup(800,600)
    
    #画头
    
    turtle.penup()
    turtle.goto(0,100)
    turtle.pendown()
    turtle.pensize(20)
    turtle.fillcolor('black')
    turtle.begin_fill()
    turtle.circle(80,360)
    turtle.end_fill()
    
    #画肚子
    turtle.up()
    turtle.goto(-70,130)
    # turtle.pencolor("red")   #找画笔
    turtle.seth(-125)
    turtle.pendown()
    turtle.pensize(10)
    turtle.circle(300,60)
    turtle.up()
    
    turtle.goto(70,130)
    # turtle.pencolor("red")
    turtle.down()
    turtle.circle(-320,60)
    # turtle.pencolor("red")
    turtle.seth(-180)
    turtle.circle(-450,18)
    
    
    #画脚
    turtle.up()
    turtle.pencolor("yellow")
    
    turtle.seth(-100)
    turtle.pendown()
    turtle.fillcolor("yellow")
    turtle.begin_fill()
    turtle.fd(50)
    turtle.seth(30)
    turtle.fd(63)
    turtle.end_fill()
    
    
    
    turtle.seth(0)
    turtle.up()
    
    turtle.fd(50)
    turtle.seth(-70)
    turtle.pendown()
    turtle.fillcolor("yellow")
    turtle.begin_fill()
    turtle.fd(50)
    turtle.seth(60)
    turtle.fd(50)
    turtle.end_fill()
    turtle.up()
    
    #画手
    
    turtle.goto(125,30)
    turtle.down()
    turtle.pencolor("black")
    turtle.seth(-65)
    turtle.pensize(50)
    turtle.fd(100)
    
    turtle.up()
    turtle.goto(-135,30)
    turtle.down()
    turtle.seth(-120)
    turtle.fd(100)
    turtle.up()
    
    #围巾
    turtle.goto(-70,120)
    turtle.seth(-60)
    turtle.down()
    turtle.pencolor("red")
    turtle.pensize(20)
    turtle.circle(80,125)
    
    #画眼
    turtle.up()
    turtle.goto(-20,190)
    turtle.down()
    turtle.pencolor("white")
    turtle.pensize(3)
    turtle.fillcolor('white')
    turtle.begin_fill()
    turtle.circle(20,360)
    turtle.end_fill()
    
    
    turtle.up()
    turtle.goto(60,190)
    turtle.down()
    turtle.fillcolor('white')
    turtle.begin_fill()
    turtle.circle(20,360)
    turtle.end_fill()
    
    #画眼珠子
    
    turtle.pencolor("black")
    turtle.up()
    turtle.goto(40,200)
    turtle.down()
    turtle.pensize(3)
    turtle.circle(1,360)
    
    turtle.up()
    turtle.goto(-40,200)
    turtle.down()
    turtle.circle(1,360)
    
    
    #画嘴
    turtle.up()
    turtle.goto(-35,160)
    turtle.down()
    turtle.pencolor("yellow")
    turtle.seth(0)
    turtle.fillcolor('yellow')
    turtle.begin_fill()
    turtle.fd(80)
    turtle.seth(-145)
    turtle.fd(50)
    turtle.seth(145)
    turtle.fd(50)
    turtle.end_fill()
    
    turtle.up()
    turtle.goto(200,200)
    
    
    turtle.done()
    
    
    
    
    
    
  • 相关阅读:
    Redis
    Linux 软件安装
    Linux系统的目录和启动过程,Linux命令,权限控制
    虚拟机,Linux,VMware三种网络连接模式区别
    Spring Boot
    shiro和spring和springmvc的集成
    shiro
    Mybatis的逆向工程,MySQL8的数据库,8.0.11驱动的逆向工程的坑的解决方法
    jdk分析工具:jps和jstack
    如何使用jconsole(英文)
  • 原文地址:https://www.cnblogs.com/fwzzz/p/11401500.html
Copyright © 2011-2022 走看看