6
$\begingroup$

How many disconnected regions does Lissajous curve divide the plane into?

For example: Let

g = ParametricPlot[{Sin[2 t], Sin[t]}, {t, 0, 2 π}]

enter image description here

The number of disconnected regions made by curve g is 3.

$\endgroup$
  • 2
    $\begingroup$ And what have you tried? $\endgroup$ – Kuba May 12 '15 at 11:20
  • 6
    $\begingroup$ Seems like a mathematics question. Isn't it just 2 plus the number of crossings, provided it's a closed curve with simple crossings? $\endgroup$ – Michael E2 May 12 '15 at 11:56
  • $\begingroup$ Not sure how general this is: perhaps Graphics`Mesh`MeshInit[];1 + Length@ Graphics`Mesh`FindIntersections[ ParametricPlot[{Sin[# t], Sin[ (# - 1) t]}, {t, 0, 2 Pi }]] & /@ {2, 3, 4, 5}? $\endgroup$ – kglr May 12 '15 at 12:07
  • $\begingroup$ @kguler Oh,guy,why the answer of Length@GraphicsMeshFindIntersections[ ParametricPlot[{Sin[2 t], Sin[(2 - 1) t]}, {t, 0, 2 Pi}]] is 2?But it should be 1 .Somthing wrong? $\endgroup$ – WateSoyan May 12 '15 at 12:15
  • $\begingroup$ @WateSoyan, for a closed curve the starting point is also an intersection (it intersects with the ending point). $\endgroup$ – kglr May 12 '15 at 12:45
16
$\begingroup$

I don't like to think too much :P

Manipulate[
 {#, Composition[
      # - 1 &,
      Length,
      Union,
      Flatten,
      MorphologicalComponents,
      Binarize,
      Rasterize
      ]@#} &@
  ParametricPlot[{Sin[ n t], Sin[m t]}, {t, 0, 2 Pi}, Axes -> False, 
   PlotStyle -> Thick]
 , {n, 2, 10, 1}, {m, 1, 9, 1}]

enter image description here

$\endgroup$
  • $\begingroup$ A similar method was used to count the self-intersections of Lissajous curve. $\endgroup$ – WateSoyan May 12 '15 at 12:10
  • $\begingroup$ @WateSoyan it depends on what do you mean by similar, but it doesn't seem so. $\endgroup$ – Kuba May 12 '15 at 12:18
  • $\begingroup$ Your code is so applicable that I benefit a lot from it.:) $\endgroup$ – WateSoyan May 12 '15 at 12:45
  • $\begingroup$ You might want to add imagesize, which is a function of n and m $\endgroup$ – Alexey Bobrick May 15 '15 at 14:52
11
$\begingroup$
Graphics`Mesh`MeshInit[];
eps = 1/100000000;
Manipulate[Labeled[plt = ParametricPlot[{Sin[n t], Sin[(n - 1) t]}, {t, eps, 2 Pi},
    Axes -> False, PlotStyle -> Thick]; plt /. Line -> Polygon, 
  Grid[{{"n", "p"}, {n, 2 + Length@Graphics`Mesh`FindIntersections[plt]}}, 
       ItemStyle -> Directive[16, "Panel"]], Top], {n, 2, 10, 1}]

enter image description here

$\endgroup$
  • $\begingroup$ Your method is nice.Thank you.But could you explain why your code should return a true result? $\endgroup$ – WateSoyan May 12 '15 at 12:47
  • $\begingroup$ @WateSoyan, rough/raw intuition: every time a simple curve intersects itself it creates a new region/polygon (try it with pen and paper). $\endgroup$ – kglr May 12 '15 at 12:56
  • $\begingroup$ Yes,in this cases, it's true.But I think it's not always be true in other cases. $\endgroup$ – WateSoyan May 12 '15 at 13:05
  • 1
    $\begingroup$ By any chance, @Wate, are you in any way familiar with Euler's $v-e+f=2$? $\endgroup$ – J. M. will be back soon May 12 '15 at 14:34
  • 1
    $\begingroup$ However, @Wate, you only asked about Lissajous curves in the question; these curves will only exhibit double nodes, so kguler's counting strategy works here. If you want to ask about rosettes instead, ask a new question. $\endgroup$ – J. M. will be back soon May 13 '15 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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