How can I fill-in this Pentagram?

You could use the undocumented functions SimplePolygonPartition and PolygonCombine:

poly = Polygon[Table[{Cos[t], Sin[t]}, {t, 0, 4 \[Pi], (4 \[Pi])/5}]];

Graphics`Mesh`MeshInit[];
poly2 = PolygonCombine@SimplePolygonPartition@poly;
Graphics[{EdgeForm[Black], Yellow, poly2}]

enter image description here


The problem is that you have overlapping areas. The way this is handled by Mathematica is twice covered it will be negated and not be filled.

You could draw it by creating both the points at the tips and the valleys:

 Graphics[{Yellow,
 Polygon[
 Reverse@Riffle[
   Table[{Cos[t], Sin[t]}, {t, 0, 2 π, (2 π)/5}],
   Table[
    2/(3 + Sqrt[5]) {Cos[t + π/5], Sin[t + π/5]}, {t, 0, 
    2 π, (2 π)/5}]
   ]]
  }]

I'm not certain about the scaling factor for the valleys, but it looks close enough.


In Mathematica 12

poly=Polygon[Table[{Cos[t],Sin[t]},{t,0,4π, 4π/5}]];
Graphics[{Yellow,#},PlotRange->1]& /@ {poly,OuterPolygon[poly],InnerPolygon[poly]}

enter image description here

Tags:

Graphics