李雪莹和魏子迪合作画了一只兔子

简单少女心

import turtle
turtle.speed(1)
turtle.screensize(600,800,‘red‘and ‘pink‘)
turtle.color(‘yellow‘)
turtle.pensize(10)
turtle.circle(100)
turtle.up()
turtle.circle(100,150)
turtle.down()
turtle.right(80)
a=1
turtle.fd(90)
turtle.circle(30,40)
for i in range(120):
    if 0<=i<50:
        a=a+0.02
        turtle.lt(3)  #向左转3度
        turtle.fd(a)  #向前走a的步长

turtle.fd(80)
turtle.right(150)
turtle.fd(100)
turtle.circle(30,200)
turtle.fd(75)

turtle.up()  #left
turtle.right(30)
turtle.fd(80)
turtle.down()
turtle.pensize(8)
turtle.circle(20)
turtle.circle(20,110)
turtle.circle(10)
turtle.right(30)

turtle.up()   #right
turtle.fd(50)
turtle.down()
turtle.pensize(8)
turtle.circle(17)
turtle.circle(8)

turtle.up()   #nose
turtle.right(120)
turtle.fd(50)
turtle.down()
turtle.pensize(15)
turtle.circle(1)
turtle.pensize(8)
turtle.circle(20,130)
turtle.left(30)
turtle.up()
turtle.left(60)
turtle.circle(30,65)
turtle.down()
turtle.left(100)
turtle.fd(2)
turtle.circle(-20,100)

turtle.up()  #body
turtle.pensize(10)
turtle.left(62)
turtle.fd(50)
turtle.down()
turtle.left(20)
turtle.fd(120)
turtle.circle(120,20)
turtle.pensize(40)
turtle.circle(-3)
turtle.pensize(10)
turtle.circle(110,40)
turtle.circle(20,20)
turtle.left(35)
turtle.fd(170)
turtle.circle(60,100)
turtle.circle(40,150)
turtle.up()
turtle.left(40)
turtle.fd(40)
turtle.down()
turtle.left(180)
turtle.fd(100)

turtle.right(120)    #arm
turtle.circle(60,100)
turtle.circle(20,130)
turtle.circle(-60,70)
turtle.circle(-20,50)

turtle.up()
turtle.right(150)
turtle.color(‘red‘)
turtle.pensize(20)
turtle.left(180)
turtle.fd(85)
turtle.down()
turtle.circle(3)

#xin
turtle.colormode(255)
turtle.pensize(3)
turtle.speed(0)
turtle.seth(0)
turtle.penup()
turtle.fd(250)
turtle.pendown()

def drawxin(radius,angle,length):
    turtle.circle(radius,angle)

turtle.color((255,62,150))
turtle.begin_fill()
turtle.seth(40)
turtle.fd(40)
turtle.circle(60,70,20)
turtle.circle(30,130,30)
turtle.seth(120)  #left

turtle.circle(30,130,30)
turtle.circle(60,80,20)
turtle.fd(40)
turtle.end_fill()  #right

turtle.seth(90)
turtle.pensize(3)
turtle.fillcolor((255,162,193))
turtle.begin_fill()
turtle.seth(90)
turtle.penup()
turtle.fd(15)
turtle.pendown()

turtle.seth(40)
turtle.fd(40)
turtle.circle(38,80,800)
turtle.circle(24,140,30)
turtle.seth(110)
turtle.circle(29,115,30)
turtle.seth(240)
turtle.circle(38,80,800)
turtle.seth(324)
turtle.fd(52)
turtle.end_fill()

turtle.pensize(1)
turtle.color(‘white‘)
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(90)
turtle.penup()
turtle.fd(50)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color(‘white‘)
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(0)
turtle.penup()
turtle.fd(30)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color(‘white‘)
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(230)
turtle.penup()
turtle.fd(30)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color(‘white‘)
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(180)
turtle.penup()
turtle.fd(20)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color(‘white‘)
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(140)
turtle.penup()
turtle.fd(30)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color(‘white‘)
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(110)
turtle.penup()
turtle.fd(26)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color(‘white‘)
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(0)
turtle.penup()
turtle.fd(20)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color(‘white‘)
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(0)
turtle.penup()
turtle.fd(50)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()

turtle.penup()
turtle.seth(220)
turtle.fd(600)
turtle.pendown()
turtle.color((238,130,238))
turtle.begin_fill()
turtle.seth(40)
turtle.fd(40)
turtle.circle(60,70,20)
turtle.circle(30,130,30)
turtle.seth(120)  #left

turtle.circle(30,130,30)
turtle.circle(60,80,20)
turtle.fd(40)
turtle.end_fill()  #right

turtle.pensize(1)
turtle.color(‘red‘)
turtle.fillcolor((255,0,0))
turtle.begin_fill()

turtle.penup()
turtle.seth(0)
turtle.fd(20)
turtle.pendown()
turtle.seth(40)
turtle.fd(40)
turtle.circle(38,80,800)
turtle.circle(24,140,30)
turtle.seth(110)
turtle.circle(29,115,30)
turtle.seth(240)
turtle.circle(38,80,800)
turtle.seth(324)
turtle.fd(52)
turtle.end_fill()

  

原文地址:https://www.cnblogs.com/lixueyinggg/p/9951460.html

时间: 2024-08-30 03:45:29

李雪莹和魏子迪合作画了一只兔子的相关文章

iOS不得姐项目--精华模块上拉下拉的注意事项,日期显示,重构子控制器,计算cell的高度(只计算一次),图片帖子的显示

一.上拉下拉注意事项 使用MJRefresh中的上拉控件自动设置透明 当请求下页数据通过page的时候,注意的是上拉加载更多数据失败的问题,下拉加载数据失败了,页数应该还原.或者是请求成功的时候再将页数修改 二.帖子中的日期显示问题(操作日期的两个类的使用) 期望达到的效果:如图 <1>NSDate -- 需要通过NSDateFormatter(日期格式类)将日期转换成相同的格式,才能相互运算,计算出来的时间间隔是以秒数来呈现的. <2>NSCalendar(日历类) -- 通过当

[OpenGL] 兔子与显示列表

1.调整桌子的大小.         在OpenGL绘制长方体,可以通过函数: glutSolidCube(Size)          绘制得到的是一个正方体,再利用缩放矩阵使其变成长方体,使得桌子的大小刚好可以放下16只兔子. 2.兔子的增多减少 使用一个全局变量rabbitNum来记录兔子的数量. 在键盘回调函数中,在按下I,K后令rabbitNum增加或减少,并维护兔子的数量在1~16,等于16或1不再进行相应操作. 绘制兔子时,通过循环控制,每画完一只兔子,平移一段距离,画到第4i+1

【MATLAB】画信号频谱的子函数

输入信号序列和采样率,该子函数可以画出该信号的频谱图. function [f,spec,NFFT]=spec_fft_plot(sample,L,Fs) % 输入数据说明: % sample:信号序列: % L:信号序列的长度: % Fs:该信号的采样频率. % 输出数据说明: % f:频率: % spec:频谱图纵坐标: NFFT = 2^nextpow2(L); % NFFT = L; spec=abs(fft(sample,NFFT)./L); flag = 1; if flag ==1

《Windows程序设计》读书笔九 子窗口控件

第九章 子窗口控件 子窗口可以作为控制屏幕图形显示,响应用户输入,以及在有重要输入事件的时候通知另一窗口. 标准子窗口控件,按钮,复选框,编辑框,列表框,组合框,文本字符串和滚动条. 可以使用CreateWindow来创建子窗口控件,或者在程序的资源脚本里编辑好各种属性. 使用预定义控件不需要再注册相应的子窗口类,这些类已经存在于windows中并且已经有了预定义的名称. 在调用CreateWindow时,只需要使用该名称作为窗口类的参数即可. 在窗口表明直接创建子窗口,所涉及的任务比使用对话框

第9章 子窗口控件_9.1-9.3按钮类、控件颜色、静态类

(1)子窗口控件:①子窗口,其parent为父窗口句柄:②子窗口状态发生变化时,会处理鼠标和键盘消息,并且通知其父窗口.可分为自定义子窗口控件和标准的子窗口控件(如按钮) (2)子窗口控件的使用场合 ①在对话框里使用最广——有内在机制支持Tab和光标移动键来转移焦点. ②在窗口表面直接使用:没内在机制支持Tab键和光标移动键来移动焦点到另一个控件: 对于自定义的控件,当单击子窗口时,父窗口会得到焦点.但对于标准子窗口控件,单击时会自动获得焦点(估计子窗口过程内部在WM_LBUTTONDOWN中实

vue父组件异步传递prop到子组件echarts画图问题踩坑总结

效果图: 大致思路:考虑到5张图都是折线图,所以准备用一个子组件承接echarts画图,然后父组件通过prop传递不同数据来展示不同的图 踩坑问题: 1.引入line子组件,画了5个元素,但是只显示一个 原因:id重复 解决方案:prop传递不同id名 2.父组件传递的数据在子组件报错 这里情况比较特殊,我用父组件数据data里面给demo数据的时候,子组件是拿得到数据的,图片正常显示,所以以为可以了,当换成从后台请求的数据后,发现子组件总是报错,data.count is not a func

jQuery中兄弟元素、子元素和父元素的获取

我们这里主要总结jQuery中对某元素的兄弟元素.子元素和父元素的获取,原声的Javascript代码对这些元素的获取比较麻烦一些,而jQuery正好对这些方法进行封装,让我们更加方便的对这些元素进行获取和操作. jQuery提供的方法 上来就把jQuery提供的方法摆在这里是不是有点不好呀,不过,我们从jQuery的方法名称上就能知道这些方法是干嘛的了. parent(selector) 查找父元素,可传入selector进行过滤(下同) parents(selector) 查找所有的祖先节点

iframe子页面调用父页面javascript函数的方法

1.iframe子页面调用 父页面js函数 子页面调用父页面函数只需要写上window.parent就可以了.比如调用a()函数,就写成: window.parent.a(); 2.iframe父页面调用 子页面js函数 这个就稍微复杂一些,下面的方法支持ie和firefox浏览器: document.getElementById('ifrtest').contentWindow.b();

放肆地用 UIBezierPath 和 CAShapeLayer 画各种图形

CAShapeLayer 是 CALayer 的子类,但是比 CALayer 更灵活,可以画出各种图形,当然,你也可以使用其他方式来画,随你. 杂谈 在 CAShapeLayer 中,也可以像 CALayer 一样指定它的 frame 来画,就像这样: Objective-C 1 2 3 4 5 let layer = CAShapeLayer() layer.frame = CGRectMake(110, 100, 150, 100) layer.backgroundColor = UICol