叠加三角形

import turtle as t
t.pencolor("blue")  #笔触为蓝色
#绘制外部大三角形
t.fd(200)
t.seth(120)
t.fd(200)
t.seth(-120)
t.fd(200)
#绘制内部小三角形
t.seth(0)
t.fd(100)
t.seth(60)
t.fd(100)
t.seth(180)
t.fd(100)
t.seth(-60)
t.fd(100)
t.seth(120)
t.fd(100)
t.seth(0)
t.done()

原文地址:https://www.cnblogs.com/20200508zp/p/13842268.html