How to fill the closed region by ParametricPlot with solid color?
plt = ParametricPlot[ u {9 Sin[2 t] + 5 Sin[3 t], 9 Cos[2 t] - 5 Cos[3 t]},
{t, 0, 2 Pi}, {u, 0, 1}, MeshFunctions -> {Sqrt@(#1^2 + #2^2) &},
Mesh -> {{1}}, PlotPoints -> 30, MeshStyle -> Cyan, MeshShading -> {Cyan}]
Post-process plt
to remove Line
s
plt /. Line[_] :> Sequence[]
or to paint them Cyan
:
plt /. Line[x_] :> {Cyan, Line[x]}
to get
For the question
for a given point P=(x0,y0), how to determine by Mathematica whether P is inside the filled region or not
we can use the function testpoint
from this answer
testpoint[poly_, pt_] :=
Round[(Total@Mod[(# - RotateRight[#]) &@(ArcTan @@ (pt - #) & /@ poly),
2 Pi, -Pi]/2/Pi)] != 0
poly = Polygon@ Table[{9 Sin[2 t] + 5 Sin[3 t], 9 Cos[2 t] - 5 Cos[3 t]},
{t, 0, 2 Pi, Pi/100}];
{testpoint[poly[[1]], {0, 9}], testpoint[poly[[1]], {0, 0}], testpoint[poly[[1]], {5, 5}]}
(* {True, True, False} *)
See also: How to check if a 2D point is in a polygon?