0
$\begingroup$

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

enter image description here

$\endgroup$
5
  • 1
    $\begingroup$ What Mathematica code have you used to plot the image in your question? What Mathematica issue are you encountering? $\endgroup$
    – Jens
    Jun 11, 2015 at 4:30
  • $\begingroup$ 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, $\endgroup$
    – Kashif
    Jun 11, 2015 at 4:53
  • $\begingroup$ I needed its cartesian equation as i want to find its interior points $\endgroup$
    – Kashif
    Jun 11, 2015 at 5:20
  • $\begingroup$ 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. $\endgroup$ Jun 11, 2015 at 5:23
  • $\begingroup$ how can i derive cartesian equation using GroebnerBasis[] $\endgroup$
    – Kashif
    Jun 11, 2015 at 6:38

3 Answers 3

9
$\begingroup$

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}]

enter image description here

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.

$\endgroup$
1
8
$\begingroup$

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]

star shape

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

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]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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