首页 > 分享 > 520表白

520表白

520表白-桃心绘制

今天520,看到好多人表白。
看到有个绘制桃心的程序我也试试hhhhhhhh

import turtle as t import time def setTurtle(): t.screensize(900,700,'pink') #窗口大小 t.color('red','pink') #颜色 t.pensize(3) #笔粗细 t.speed(50) #速度 t.penup() #提笔 def getStart(h): #去到的坐标,窗口中心为0,0 t.goto(0,-180) r=h/5 drawBigL(r,h) drawBigArc(r,140) drawBigArc(r,70) drawBigR(r,h) centerRange() drawHope() drawName() time.sleep(2) def drawBigL(r,h): colors=['red','orange','yellow','#87CEEB','violet','red'] for i in range(int(240/h)+1): t.seth(0) t.color(colors[i],colors[i+1]) drawHeart(r) t.seth(140) t.fd(h) def drawBigArc(r,rad): colors=['red','orange','yellow','SkyBlue','violet','red'] for i in range(50): if(i%10==0): t.color(colors[int(i/10)],colors[int(i/10)+1]) t.seth(0) drawHeart(r) t.seth(rad-(i+1)*4) t.rt(4) t.fd(10.5) def drawBigR(r,h): colors=['red','orange','yellow','SkyBlue','violet','red'] for i in range(int(240/h)+1): t.color(colors[i],colors[i+1]) t.seth(0) drawHeart(r) t.setheading(220) t.fd(h) def drawHeart(r): t.down() t.begin_fill() factor=180 t.seth(45) t.circle(-r,factor) t.fd(2*r) t.right(90) t.fd(2*r) t.circle(-r,factor) t.end_fill() t.up() #在心中写字 def centerRange(): t.goto(0,0) t.write('520',font=('华文行楷',100),align="center",move=True) t.goto(0, -100) t.write('1314', font=('华文行楷', 75), align="center", move=True) time.sleep(0.1) def drawCenter(i): t.goto(0,0) colors=['red','orange','yellow','SkyBlue','violet','red'] t.pencolor(colors[i]) #在心中写字font可以设置字体自己电脑有的都可以设align开始写字的位置 #write('love...',font=('gungsuh',30,),align="cener") t.up() #写寄语 def drawHope(): t.pencolor('black') t.goto(-300,-220) t.showturtle() t.write('我不擅长恋爱,',font=('华文行楷',25),align="center",move=True) t.goto(-300,-270) t.write('但我天生爱你。',font=('华文行楷',25),align="center",move=True) #写署名 def drawName(): t.pencolor('black') t.goto(250,-250) t.showturtle() t.write('2020.5.20',font=('gungsuh',20,),align="center",move=True) time.sleep(2) setTurtle() getStart(80)

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102

在这里插入图片描述

相关知识

520送花该如何表白
“520”引爆“表白经济”
520情人节鲜花表白祝福语
520表白情话文案(精选480句)
适合520表白的文案(精选450句)
520表白日你对表白攻略做好准备了吗?方案提前已备好只等你来取
520心动礼、促销活动:美团 520表白节 鲜花会场 11朵玫瑰花束68元起~
2018年5月20日适合表白吗?520告白怎么做成功率高一点
520送花卡片内容表白简短句子(精选550句)
520情人节送什么花最好?520情人节送花推荐!

网址: 520表白 https://m.huajiangbk.com/newsview792618.html

所属分类:花卉
上一篇: 婚礼爱情告白短句(结婚爱的告白短
下一篇: 爱情告白短信