How Do I fill the Area of a Polar Plot
We can use ParametricPlot
instead of PolarPlot
to construct the region.
Here we change the definition of domain from π/2
to 2 π + π/2
in order to make the boundary of region fine.
ρ[a_, θ_] := a (1 - Sin[θ]);
region = ParametricPlot[ρ[a, θ]*{Cos[θ],
Sin[θ]}, {θ, π/2, 2 π + π/2}, {a, 0,
2}, Axes -> False, BoundaryStyle -> {Thick, Brown},
PlotStyle -> Green, PlotPoints -> 30]
Your animation maybe as this:
ρ[a_, θ_] := a (1 - Sin[θ]);
region[c_] :=
ParametricPlot[{ρ[a, θ]*{Cos[θ],
Sin[θ]}}, {θ, π/2, 2 π + π/2}, {a, 0,
c}, Axes -> False, BoundaryStyle -> {Thick, Brown},
PlotStyle -> Green, PlotPoints -> 30, PerformanceGoal -> "Quality"];
Manipulate[{PolarPlot[10 (1 - Sin[θ]), {θ, 0, 2 π},
PolarGridLines -> Automatic, PlotRange -> 20], region[a]} //
Show, {a, 1, 10}]
You can post-process PolarPlot
output to add FilledCurve
s:
PolarPlot[Evaluate @ Table[a (1 - Sin[θ]), {a, 10, 1, -1}], {θ, 0, 2 π},
Axes -> False, ImageSize -> Large, PlotLegends -> "Expressions"] /.
l_Line :> {l, Dynamic[Lighter@Lighter@CurrentValue["Color"]], FilledCurve[l]}
pp = PolarPlot[5 (1 - Sin[θ])^2, {θ, 0, 2 π},
PolarGridLines -> True, PlotRange -> All, PlotStyle -> None];
Manipulate[Show[pp, PolarPlot[(a/2) (1 - Sin[θ])^2, {θ, 0, 2 π}] /.
l_Line -> {l, Opacity[.5], FilledCurve[l]},
PlotLabel -> "Polar Graph of the Cardioid: " <>
ToString[a / 2 (1 - Sin[θ]) , TraditionalForm]],
{a, 1, 10}]