五角星绘制

import math
import turtle
RADIUS = 100
angleSin18 = math.sin(math.pi * 0.1) * RADIUS
angleCos18 = math.cos(math.pi * 0.1) * RADIUS
angleSin54 = math.sin(math.pi * 0.3) * RADIUS
angleCos54 = math.cos(math.pi * 0.3) * RADIUS
turtle.width(10)
turtle.color("Yellow")
turtle.penup()
turtle.goto(-angleCos18, angleSin18)
turtle.pendown()
turtle.goto(angleCos18, angleSin18)
turtle.goto(-angleCos54, -angleSin54)
turtle.goto(0, RADIUS)
turtle.goto(angleCos54, -angleSin54)
turtle.goto(-angleCos18, angleSin18)

原文地址:https://www.cnblogs.com/567823a/p/12499973.html