# Cartesian equation of star shape

I need Cartesian equation of the following star shape. As i want to use its Cartesian equation for Plot3D.

• What Mathematica code have you used to plot the image in your question? What Mathematica issue are you encountering?
– Jens
Jun 11, 2015 at 4:30
• Thanks Mr. Jens, As you can see in Mathematica help, For Plot3D , we need to give bounds in the form of cartesian coordinates, thats why i need to find its cartesian equation, Jun 11, 2015 at 4:53
• I needed its cartesian equation as i want to find its interior points Jun 11, 2015 at 5:20
• As for the Cartesian equation… I normally use GroebnerBasis[] for deriving this. This will likely be a very high-degree algebraic equation that will be too unwieldy to manipulate. Jun 11, 2015 at 5:23
• how can i derive cartesian equation using GroebnerBasis[] Jun 11, 2015 at 6:38

Another way to parameterize this curve is to recognize that it is a sine wave (of 18 cycles) plotted around the unit circle. One concise representation of the unit circle is with the real and imaginary parts of the complex exponential Exp[I 2 Pi t]. Hence:

f[t_] := Exp[I t ] (1 + 0.15 Sin[18 t + Pi/2]);
ParametricPlot[{Re[f[t]], Im[f[t]]}, {t, 0, 2 Pi}]

Guess_who_it_is suggests the even simpler version

PolarPlot[1 + 0.15 Sin[18 t + Pi/2], {t, 0, 2 Pi}]

which gives the same plot.

• …or use PolarPlot[]. ;) Jun 11, 2015 at 7:34

You'll need to set the radius of the curve (r) that goes through the center of the cosine waves and the desired number of peaks (a)

r = 6;
a = 18;
ListPlot[Table[{(r + Cos[a 2 π i/360]) Cos[2 π i/360] ,
(r + Cos[a 2 π i/360]) Sin[2 π i/360]}, {i, 360}],
AspectRatio -> 1]

• The same, shorter r = 6; a = 18; n = 360; ListPlot[(r + Cos[a #]) {Cos@#, Sin@#} & /@ Range[0, 2 Pi, 2 Pi/n], AspectRatio -> 1] Jun 11, 2015 at 5:23

Convert polar equation to use Intrinsic equation and ContourPlot:

ContourPlot[
1 + 1/8 Sin[18 ArcTan[x, y]] == Sqrt[x^2 + y^2], {x, -1.15,
1.15}, {y, -1.15, 1.15}, Axes -> True]