I have the following function
partitionfunction[d_][q_] :=
Piecewise[{
{Sin[(Pi*q)/(2*d)]^2, Inequality[0, LessEqual, q, Less, d]},
{1, Inequality[d, LessEqual, q, Less, 2*Pi - d]},
{Sin[(Pi*(2*Pi - q))/(2*d)]^2, 2*Pi - d <= q <= 2*Pi}}]
radius[d_][q_] := 1 + 1.5partitionfunction[d][q]BesselJ[5, (13/(2Pi))q + 5]
curve[d_][q_] := radius[d][q]*{Cos[q], Sin[q]}
which I use to generate the following plot
ParametricPlot[curve[1][q], {q, 0, 2*Pi},
Axes -> False,
PlotPoints -> 50,
PlotStyle -> Thickness[0.007]]
So far so good. But when I try to fill the enclosed area, I get a strange white polygon.
ParametricPlot[curve[1][q], {q, 0, 2*Pi},
Axes -> False,
PlotPoints -> 50,
PlotStyle -> Thickness[0.007]] /.
Line[l_List] :> {{Orange, Polygon[l]}, {Black, Line[l]}}
Also the filling goes outside the boundary.
Any ideas to fix this behavior?
EDIT
Searching here I try this
g =
ParametricPlot[curve[1][q], {q, 0, 2*Pi},
Axes -> False,
PlotPoints -> 50,
PlotStyle -> Thickness[0.007]]
line = Cases[g, l_Line :> First @ l, Infinity];
Graphics[
{Opacity[0.4], Darker @ Orange, EdgeForm[Darker @ Orange], Polygon[line]},
Options[g]]
The polygon is still evident, but this time the filling does not go outside the boundary.




curve? – eldo Nov 18 '15 at 15:23curveI think that the problem can be solved withExclusions->None. – ybeltukov Nov 18 '15 at 15:25Exclusions->Nonedid indeed solve the issue! Amazing without even seeing the definitions. Thanks! – Dimitris Nov 18 '15 at 15:31Exclusions->Noneis necessary here? – Dimitris Nov 18 '15 at 16:32