绘制叠加等边三角形

Posted dengyaling

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了绘制叠加等边三角形相关的知识,希望对你有一定的参考价值。

import turtle
turtle.pencolor("blue")
#绘制外部大三角形
turtle.fd(200)
turtle.seth(120)
turtle.fd(200)
turtle.seth(-120)
turtle.fd(200)
#绘制内部小三角形
turtle.seth(0)
turtle.fd(100)
turtle.seth(60)
turtle.fd(100)
turtle.seth(180)
turtle.fd(100)
trutle.seth(-60)
turtle.fd(100)
turtle.seth(120)
turtle.fd(100)
turtle.seth(0)
trutle.done()

 

以上是关于绘制叠加等边三角形的主要内容,如果未能解决你的问题,请参考以下文章