Plot parametricplot3d like this example

  • Mathematica
  • Thread starter member 428835
  • Start date
  • Tags
    Example Plot
In summary, the conversation discusses two examples of a vibrating membrane plotted from a top view. The first example is created using a formula involving trigonometric functions and Bessel functions. The second example uses a similar formula but with different parameters. Both examples show how the membrane vibrates in response to different frequencies.
  • #1
member 428835
Hi PF!

Here looking at the first answer are two awesome examples of a vibrating membrane plotted from a top view. I can create the first example via
Code:
fXYZ =
{Cos[\[Theta]] Csc[\[Pi]/180] Sin[s Sin[\[Pi]/180]] -
  0.001 Cos[\[Theta]] Cos[2 \[Theta]] Sin[
    s Sin[\[Pi]/
      180]] (10.7721 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           1.52712 (BesselJ[1,
               175.004 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               175.004 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             3.05424 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           3.05424 BesselJ[2,
             175.004 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             3.05424 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) +
     0.0939376 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           3.35307 (BesselJ[1,
               384.253 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               384.253 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             6.70613 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           6.70613 BesselJ[2,
             384.253 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             6.70613 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) -
     0.000899129 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           4.98473 (BesselJ[1,
               571.237 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               571.237 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             9.96947 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           9.96947 BesselJ[2,
             571.237 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             9.96947 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) +
     0.0000163397 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           6.58519 (BesselJ[1,
               754.645 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               754.645 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             13.1704 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           13.1704 BesselJ[2,
             754.645 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             13.1704 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) -
     3.74518*10^-7 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           8.17376 (BesselJ[1,
               936.692 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
           
              BesselJ[3,
               936.692 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             16.3475 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           16.3475 BesselJ[2,
             936.692 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             16.3475 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) +
     9.80625*10^-9 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           9.75646 (BesselJ[1,
               1118.06 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               1118.06 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             19.5129 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           19.5129 BesselJ[2,
             1118.06 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             19.5129 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) -
     2.94642*10^-10 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           11.3358 (BesselJ[1,
               1299.05 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               1299.05 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             22.6716 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           22.6716 BesselJ[2,
             1299.05 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             22.6716 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]))),
 Csc[\[Pi]/180] Sin[\[Theta]] Sin[s Sin[\[Pi]/180]] -
  0.001 Cos[2 \[Theta]] Sin[\[Theta]] Sin[
    s Sin[\[Pi]/
      180]] (10.7721 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           1.52712 (BesselJ[1,
               175.004 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               175.004 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             3.05424 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           3.05424 BesselJ[2,
             175.004 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             3.05424 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) +
     0.0939376 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           3.35307 (BesselJ[1,
               384.253 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               384.253 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             6.70613 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           6.70613 BesselJ[2,
             384.253 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             6.70613 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) -
     0.000899129 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           4.98473 (BesselJ[1,
               571.237 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               571.237 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             9.96947 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           9.96947 BesselJ[2,
             571.237 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             9.96947 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) +
     0.0000163397 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           6.58519 (BesselJ[1,
               754.645 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               754.645 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             13.1704 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           13.1704 BesselJ[2,
             754.645 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
          
             13.1704 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) -
     3.74518*10^-7 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           8.17376 (BesselJ[1,
               936.692 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               936.692 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             16.3475 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           16.3475 BesselJ[2,
             936.692 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             16.3475 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) +
     9.80625*10^-9 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           9.75646 (BesselJ[1,
               1118.06 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               1118.06 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             19.5129 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           19.5129 BesselJ[2,
             1118.06 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             19.5129 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) -
     2.94642*10^-10 (0. -
        Sqrt[
         1 - Cos[s Sin[\[Pi]/180]]^2] (0. +
           11.3358 (BesselJ[1,
               1299.05 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               1299.05 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             22.6716 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           22.6716 BesselJ[2,
             1299.05 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             22.6716 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]))), (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
    180] + 0.001 Cos[2 \[Theta]] Cos[
    s Sin[\[Pi]/
      180]] (10.7721 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           1.52712 (BesselJ[1,
               175.004 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               175.004 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             3.05424 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           3.05424 BesselJ[2,
             175.004 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             3.05424 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) +
     0.0939376 (0. -
        Sqrt[1 -
       
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           3.35307 (BesselJ[1,
               384.253 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               384.253 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             6.70613 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           6.70613 BesselJ[2,
             384.253 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             6.70613 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) -
     0.000899129 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           4.98473 (BesselJ[1,
               571.237 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               571.237 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             9.96947 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           9.96947 BesselJ[2,
             571.237 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             9.96947 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) +
     0.0000163397 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           6.58519 (BesselJ[1,
               754.645 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
           
              BesselJ[3,
               754.645 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             13.1704 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           13.1704 BesselJ[2,
             754.645 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             13.1704 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) -
     3.74518*10^-7 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           8.17376 (BesselJ[1,
               936.692 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               936.692 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             16.3475 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           16.3475 BesselJ[2,
             936.692 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             16.3475 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) +
     9.80625*10^-9 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           9.75646 (BesselJ[1,
               1118.06 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               1118.06 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             19.5129 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           19.5129 BesselJ[2,
             1118.06 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             19.5129 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])) -
     2.94642*10^-10 (0. -
        Sqrt[1 -
          Cos[s Sin[\[Pi]/180]]^2] (0. +
           11.3358 (BesselJ[1,
               1299.05 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] -
              BesselJ[3,
               1299.05 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]]) Cosh[
             22.6716 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])]) +
        Cos[s Sin[\[Pi]/180]] (0. +
           22.6716 BesselJ[2,
             1299.05 Sqrt[1 - Cos[s Sin[\[Pi]/180]]^2]] Sinh[
             22.6716 (1 + (1 - Cos[s Sin[\[Pi]/180]]) Csc[\[Pi]/
                  180])])))};

ParametricPlot3D[
 Evaluate[fXYZ], {s,
   0,1/180 \[Pi] Csc[\[Pi]/180]}, {\[Theta], 0, 2 \[Pi]}, Boxed -> False,
 ViewPoint -> {0, 0, Infinity}, Axes -> False,
 ColorFunction ->
  Function[{x, y, z}, Glow[ColorData["GrayTones", z]]], Mesh -> None,
 Lighting -> None]
However, I can't figure out how to create that brown plot they do (their second plot). Any suggestions (obviously my plot is a parametric 3D plot, so the form is different, hence what's killing me).
 
Physics news on Phys.org
  • #2
joshmccraney said:
Hi PF!

Here looking at the first answer are two awesome examples of a vibrating membrane plotted from a top view.
Does anyone have any idea where the
Code:
2 ArcTan[10 x]/Pi + .5
comes from at the link? I'm clueless, but the magic seems to be here.
 
  • #3
For future regard, this ended up working out very nicely (figured out how to vary the color proportional to height):
Code:
ParametricPlot3D[
 Evaluate[fXYZ], {s, 0, 1/180 \[Pi] Csc[\[Pi]/180]}, {\[Theta], 0,
  2 \[Pi]}, PlotRange -> All,
 ColorFunction ->
  Function[{x, y, z}, Blend[{Black, White, White}, Abs[ 10 z]]],
 ColorFunctionScaling -> False, ViewPoint -> {0, 0, Infinity},
 Axes -> False, Mesh -> None, PlotPoints -> 300, MaxRecursion -> 0]
 

1. What is a parametric plot in 3D?

A parametric plot in 3D is a type of graph that shows the relationship between three variables, where each variable is represented by a different axis. It is used to visualize complex mathematical functions or data sets.

2. How do you plot a parametric plot in 3D?

To plot a parametric plot in 3D, you will need to use a programming language or software that supports 3D graphing, such as MATLAB or Mathematica. You will also need to define the equations for each variable and specify the range of values for each axis.

3. What is the difference between a parametric plot and a regular plot?

The main difference between a parametric plot and a regular plot is that in a parametric plot, the variables are not directly related to each other. In a regular plot, the variables are typically dependent on each other, such as in a line or scatter plot.

4. Can a parametric plot in 3D be used for real-world data?

Yes, a parametric plot in 3D can be used for real-world data. It can be helpful in visualizing complex data sets or relationships between multiple variables.

5. Are there any limitations to plotting parametric plots in 3D?

One limitation of plotting parametric plots in 3D is that it can be difficult to interpret the graph if there are too many variables or if the equations are very complex. Additionally, not all software or programming languages may support 3D graphing, making it more challenging to create these types of plots.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
566
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
946
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
351
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
618
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Back
Top