3
$\begingroup$

I use this code to plot a parametric plot.

ParametricPlot[{2 Sin[t + 3/2 π] + 4/3*Cos[3 t], 
  2 Cos[t + 3/2 π] + 4/3*Sin[3 t]}, {t, -2 π, 2 π}, 
 PlotLabel -> "Proximus Symbool"]

What i get

Now I tried different ways of plotting it and coloring it however none of them work so far. So What i actually wanna achieve is this kind of picture:

With this i could explain that you need to calculate the surface between $$+\frac{5\cdot \sqrt{2}}{3}$$ and $$-\frac{5\cdot \sqrt{2}}{3}$$

What i want

$\endgroup$
5
$\begingroup$

You can use FilledCurve to color in the line. The simplest method to get the different colors for this example is probably to create the plot twice, with a RegionFunction to exclude the inner part for the second plot.

plot[col_, opts___] := ParametricPlot[
   {2 Sin[t + 3/2 π] + 4/3*Cos[3 t], 2 Cos[t + 3/2 π] + 4/3*Sin[3 t]}, {t, 0, 2 π},
   PlotLabel -> "Proximus Symbool", opts] /. l_Line :>
   {EdgeForm[{Thick, Blue}], FaceForm[Opacity[1, col]], FilledCurve@l}

Show[plot[Green], plot[Pink, RegionFunction -> (#1^2 + #2^2 > 10/9 &)]]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.