向暗恋的人示爱
import turtle as t t.penup() t.goto(-320,50) t.pensize(3) t.pd() t.pencolor("pink") t.fd(20) t.bk(10) t.seth(-90) t.fd(50) t.seth(0) t.bk(10) t.fd(20) t.pu() t.goto(-250,50) t.pd() t.seth(-90) t.fd(50) t.seth(0) t.fd(20) t.pu() t.goto(-220,0) t.pd() t.circle(12.5,360) t.pu() t.goto(-205,25) t.pd() t.seth(-60) t.fd(50/(3**0.5)) t.seth(60) t.fd(50/(3**0.5)) t.pu() t.goto(-150,12.5) t.pd() t.seth(90) t.circle(12,305) t.pu() t.goto(-150,12.5) t.seth(0) t.pd() t.bk(24) t.pu() t.goto(-100,50) t.pd() t.seth(-90) t.fd(40) t.circle(10,180) t.fd(40) t.pu() t.goto(-20,50) t.pd() t.seth(-90) t.fd(50) t.seth(0) t.fd(20) t.pu() t.goto(32.5,0) t.pd() t.circle(12.5,360) t.pu() t.goto(32.5,12.5) t.seth(-60) t.pd() t.fd(20) t.pu() t.goto(60,25) t.pd() t.seth(-60) t.fd(50/(3**0.5)) t.seth(0) t.pu() t.bk(25/(3**0.5)) t.pd() t.seth(60) t.fd(50/(3**0.5)) t.pu() t.goto(200,0) t.seth(0) t.pd() def curvemove(): for i in range(200): t.right(1) t.forward(1) t.color(‘black‘,‘red‘) t.begin_fill() t.left(140) t.fd(111.65) curvemove() t.left(120) curvemove() t.fd(111.65) t.end_fill() t.done()
原文:https://www.cnblogs.com/qq1294/p/12532257.html