Import script
on AngleToPt(a, r)
global c
set {cx, cy} to c
set a to 2 * pi * a
{cx + r * (sin a), cy + r * (cos a)}
end AngleToPt
set x to 500
set n to 5  number of sides
set k to 2  join vertex i to i+k
set rr to x / 50  the radius of the arcs
set r to x / 2.5
set c to {x / 2, x / 2}
set a to barycenter {AngleToPt(0, r), AngleToPt(k / n, r)}
BeginFigure(0)
SetPenWidth(x / 50)
SetPenColor({0.0, 0.3, 1})
SetFillColor({1, 0.7, 0.0})
MoveTo(a)
repeat with i from k to k * n by k
ArcToPointPath(AngleToPt(i / n, r), AngleToPt(i / n + k / n, r), rr)
end repeat
ClosePath()
DrawPath(3)
EndFigure()
