zoukankan      html  css  js  c++  java
  • turtle绘画哆啦A梦

    import turtle as t
    t.speed(0.1)
    t.setup(800,600)
    t.pensize(3)
    t.penup()
    t.goto(150,100)
    t.pendown()
    t.seth(90)
    t.circle(150,-30)
    t.circle(150,240)
    t.left(90)
    t.penup()
    t.fd(7)
    t.seth(-70)
    t.pendown()
    t.circle(130,-77)
    t.penup()
    t.circle(130,-67)
    t.pendown()
    t.circle(130,-77)
    t.penup()
    t.seth(180)
    t.goto(40,215)
    t.seth(170)
    t.pendown()
    t.circle(30,360)
    t.seth(180)
    t.penup()
    t.fd(75)
    t.pendown()
    t.circle(30,360)
    t.penup()
    t.goto(0,130)
    t.pendown()
    t.circle(10,360)
    t.seth(-90)
    t.penup()
    t.fd(20)
    t.pendown()
    t.fd(75)
    t.penup()
    t.goto(-80,100)
    t.pendown()
    t.circle(80,180)
    t.penup()
    t.goto(40,100)
    t.right(60)
    t.pendown()
    t.fd(100)
    t.penup()
    t.goto(40,90)
    t.seth(0)
    t.pendown()
    t.fd(100)
    t.penup()
    t.goto(40,80)
    t.right(30)
    t.pendown()
    t.fd(100)
    t.penup()
    t.goto(-40,100)
    t.right(180)
    t.pendown()
    t.fd(100)
    t.penup()
    t.goto(-40,90)
    t.seth(180)
    t.pendown()
    t.fd(100)
    t.penup()
    t.goto(-40,80)
    t.seth(210)
    t.pendown()
    t.fd(100)
    t.circle(30,360)
    t.penup()
    t.goto(100,30)
    t.pendown()
    t.circle(30,360)
    t.penup()
    t.goto(-140,20)
    t.pendown()
    t.left(10)
    t.circle(150,30)
    t.circle(30,180)
    t.right(22)
    t.circle(160,19)
    t.penup()
    t.goto(140,20)
    t.pendown()
    t.seth(-45)
    t.circle(-150,30)
    t.circle(-30,180)
    t.right(-17)
    t.circle(-160,17)
    t.penup()
    t.goto(-160,-83)
    t.seth(0)
    t.pendown()
    t.circle(-50,360)
    t.penup()
    t.goto(160,-83)
    t.pendown()
    
    t.circle(-50,360)
    t.penup()
    t.goto(-115,-163)
    t.pendown()
    t.seth(10)
    t.circle(-600,23)
    t.penup()
    t.goto(-82,-13)
    t.pendown()
    t.right(5)
    t.circle(270,37)
    t.penup()
    t.goto(-82,12)
    t.pendown()
    t.seth(16)
    t.circle(-270,37)
    t.penup()
    t.goto(-50,-60)
    t.seth(0)
    t.pendown()
    t.fd(100)
    t.seth(-90)
    t.circle(-50,180)
    t.done()
    

    效果图:

  • 相关阅读:
    大型网站动态应用系统架构(转)
    [转]thinkphp在iis下的rewrite伪静态的配置方法
    [转]WEB安全编程技术规范(V1.0)
    『MXNet』第八弹_数据处理API_下_Image IO专题
    『TensorFlow』变量初始化
    『TensorFlow』线程控制器类&变量作用域
    『Python CoolBook』Cython_高效数组操作
    『Python CoolBook』Cython
    『流畅的Python』第5章笔记_一等函数
    『MXNet』第十弹_物体检测SSD
  • 原文地址:https://www.cnblogs.com/cheng825/p/11191225.html
Copyright © 2011-2022 走看看