SetDirectory["/www/htdocs/people/vdkallen/webfiles/chladniplaatjes/\
Notebooks"]

<< chladni.m

export = Export

export["plus3-4.gif", 
      ContourPlot[bar[3][x] bar[4][y] + bar[4][x] bar[3][
              y], {x, -1, 1}, {y, -1, 1}, 
        Contours -> {-0.01, 0.01}, PlotPoints -> 100, 
        PlotLabel -> "(" <> ToString[3] <> "," <> 
            ToString[4] <> ")plus(" <> ToString[4] <> "," <> 
            ToString[3] <> ") freq=" <> 
            ToString[freqsquare[3, 4]]]]

Table[
      export["plus" <> ToString[m] <> "-" <> 
          ToString[n] <> ".gif", 
        ContourPlot[bar[m][x] bar[n][y] + bar[n][x] bar[m][
                y], {x, -1, 1}, {y, -1, 1}, 
          Contours -> {-0.01, 0.01}, PlotPoints -> 100, 
          PlotLabel -> "(" <> ToString[m] <> "," <> 
              ToString[n] <> ")plus(" <> ToString[n] <> "," <> 
              ToString[m] <> ") freq=" <> 
              ToString[freqsquare[m, n]]]], {m, 10}, {n, 0, m}]

Union[Table[{freqsquare[m, n], m, n}, {m, 2}, {n, 0, m}]]

Table[
      export["min" <> ToString[m] <> "-" <> 
          ToString[n] <> ".gif", 
        ContourPlot[bar[m][x] bar[n][y] - bar[n][x] bar[m][
                y], {x, -1, 1}, {y, -1, 1}, 
          Contours -> {-0.01, 0.01}, PlotPoints -> 100, 
          PlotLabel -> "(" <> ToString[m] <> "," <> 
              ToString[n] <> ")min(" <> ToString[n] <> "," <> 
              ToString[m] <> ") freq=" <> 
              ToString[freqsquare[m, n]]]], {m, 10}, {n, 0, 
        m - 1}]

export["freqssquare.gif", Flatten[
            Table[{freqsquare[m, n], m, n}, {m, 10}, {n, 0, m}], 1] // 
          Sort // TableForm]

\(export["freqsCsquareXL.gif", 
      Drop[Flatten[
              Table[{freqsquare[m, n]/0.2859
, m, n}, {m, 16}, {n, 0, m}], 
              1] // Sort, \(-52\)] // TableForm]\)

export["freqsrond.gif", Flatten[
            Table[{freqdisc[m, n], m, n}, {m, 0, 9}, {n, 9}], 1] // Sort // 
        TableForm]

export["freqsCrondXL.gif", 
      Union[Flatten[Table[{freqdisc[m, n]/0.2295, m, n}, {m, 0, 9}, {n, 9}], 
            1], Flatten[Table[{freqdisc[m, n], m, n}, {m, 0, 0}, {n, 13}], 
            1]] // TableForm]

Table[
      export["rond" <> ToString[p] <> "-" <> 
          ToString[q] <> ".gif", 
        ContourPlot[(disc[p, q][r] /. r -> Sqrt[u^2 + v^2] // 
                Evaluate ) Cos[p Arg[u + I v]] 
            If[u^2 + v^2 < 1, 1, 0], {u, -1, 1}, {v, -1, 1}, 
          Contours -> {- .01,  .01}, PlotPoints -> 100, 
          PlotLabel -> "(" <> ToString[p] <> "," <> 
              ToString[q] <> ") freq=" <> ToString[freqdisc[p, q]]]], {p, 
        0, 5}, {q, 5}]

Table[
      export["bar" <> ToString[m] <> ".gif", 
        Plot[bar[m][t], {t, -1, 1}, 
          PlotLabel -> "bar(" <> ToString[m] <> ") freq=" <> 
              ToString[freqbar[m]]]], {m, 0, 10}]

Table[
      export["rond" <> ToString[p] <> "-" <> 
          ToString[q] <> ".gif", 
        ContourPlot[(disc[p, q][r] /. r -> Sqrt[u^2 + v^2] // 
                Evaluate ) Cos[p Arg[u + I v]] 
            If[u^2 + v^2 < 1, 1, 0], {u, -1, 1}, {v, -1, 1}, 
          Contours -> {- .01,  .01}, PlotPoints -> 100, 
          PlotLabel -> "(" <> ToString[p] <> "," <> 
              ToString[q] <> ") freq=" <> ToString[freqdisc[p, q]]]], {p, 
        0, 5}, {q, 5}]

Table[
      export["rond" <> ToString[p] <> "-" <> 
          ToString[q] <> ".gif", 
        ContourPlot[(disc[p, q][r] /. r -> Sqrt[u^2 + v^2] // 
                Evaluate ) Cos[p Arg[u + I v]] 
            If[u^2 + v^2 < 1, 1, 0], {u, -1, 1}, {v, -1, 1}, 
          Contours -> {- .01,  .01}, PlotPoints -> 100, 
          PlotLabel -> "(" <> ToString[p] <> "," <> 
              ToString[q] <> ") freq=" <> ToString[freqdisc[p, q]]]], {p, 
        0, 0}, {q, 6, 13}]

Table[
      export["plus" <> ToString[m] <> "-" <> 
          ToString[n] <> ".gif", 
        ContourPlot[bar[m][x] bar[n][y] + bar[n][x] bar[m][
                y], {x, -1, 1}, {y, -1, 1}, 
          Contours -> {-0.01, 0.01}, PlotPoints -> 100, 
          PlotLabel -> "(" <> ToString[m] <> "," <> 
              ToString[n] <> ")plus(" <> ToString[n] <> "," <> 
              ToString[m] <> ") freq=" <> 
              ToString[freqsquare[m, n]]]], {m, 10}, {n, 0, m}]

Table[
      If[freqsquare[m, n] < 505, 
        export["plus" <> ToString[m] <> "-" <> 
            ToString[n] <> ".gif", 
          ContourPlot[bar[m][x] bar[n][y] + bar[n][x] bar[m][
                  y], {x, -1, 1}, {y, -1, 1}, 
            Contours -> {-0.01, 0.01}, PlotPoints -> 100, 
            PlotLabel -> "(" <> ToString[m] <> "," <> 
                ToString[n] <> ")plus(" <> ToString[n] <> "," <> 
                ToString[m] <> ") freq=" <> 
                ToString[freqsquare[m, n]]]]], {m, 11, 16}, {n, 0, 
        m}]

Table[
      If[freqsquare[m, n] < 505, 
        export["min" <> ToString[m] <> "-" <> 
            ToString[n] <> ".gif", 
          ContourPlot[bar[m][x] bar[n][y] - bar[n][x] bar[m][
                  y], {x, -1, 1}, {y, -1, 1}, 
            Contours -> {-0.01, 0.01}, PlotPoints -> 100, 
            PlotLabel -> "(" <> ToString[m] <> "," <> 
                ToString[n] <> ")min(" <> ToString[n] <> "," <> 
                ToString[m] <> ") freq=" <> 
                ToString[freqsquare[m, n]]]]], {m, 11, 16}, {n, 0, 
        m - 1}]

Table[
      export["bar" <> ToString[m] <> ".gif", 
        Plot[bar[m][t]/9, {t, -1, 1}, 
          PlotLabel -> "bar(" <> ToString[m] <> ") freq=" <> 
              ToString[freqbar[m]], PlotRange -> {-1, 1}, 
          Ticks -> {Automatic, {-1, -0.5, 0, 0.5, 1}}, 
          PlotStyle -> Thickness[0.02]]], {m, 7, 7}]

export["rond3D3-5.gif", 
      ParametricPlot3D[{r Cos[phi] , r Sin[phi],  
          Cos[3  phi] disc[3, 5][r]}, {r, 0, 1}, {phi, 0, 2  Pi}, 
        Axes -> False, 
        ViewPoint -> {0.739,  -1.505,  2.939}]]