1. viz 1

In our original post on drum waves, we looked at the vibrations of a circular drum. I chose that shape because just about every drum is circular, which I guess is because it is the easiest shape to manufacture as well as the most durable.

The fundamental vibrational modes are known for a few other shapes as well. Rectangles, are even simpler to handle than circles, and the fundamental modes are also known for some triangles.

In this post, I decided to visualize vibrations on drums in the shape of an ellipse. I was attracted to elliptical drums, because their vibrations are expressed in terms of Mathieu functions, which are rather exotic functions that I had not yet encountered. These functions are named after the French mathematician Émile Mathieu, who encountered these functions in the 1860s, in precisely this context of vibrating elliptical drums.

In order to obtain the wave solutions for this blog post, I followed the paper Mathieu functions, a visual approach.

The way that the wave solutions are obtained is by expressing the wave equation in elliptic coordinates, and then performing a separation of variables, in much the same way as for a disk-shaped drum.

Elliptic coordinates depend on the position of the two foci of the ellipse. For foci positioned at \((f,0)\) and \((-f,0)\), the coordinates are defined by the following equations: \[ x = f \cosh \mu \cos \nu, \quad y = f \sinh \mu \sin \nu, \] The parameter \(\mu\) plays a similar role to the radius, and curves of constant \(\mu\) correspond to confocal ellipses that grow larger as \(\mu\) increases. The parameter \(\nu\) plays a similar role to the angle, and curves of constant \(\nu\) correspond to hyperbolae orthogonal to the family of ellipses.

When performing the separation of variables in elliptic coordinates, we obtain the Mathieu differential equations: \[ \frac{d^2 \Phi}{d\nu^2} + \left( a - 2 q \cos 2 \nu \right) \Phi = 0, \] \[ \frac{d^2 R}{d\mu^2} - \left( a - 2 q \cosh 2 \mu \right) R = 0, \] Here, \(a\) is the constant coming from the separation of variables, and \(q = f^2 \omega^2 \sigma / 4 F \) is a positive parameter related to the physical properties of the drum, the focal distance, and the vibrational frequency.

The solutions to the Mathieu equation in \(\nu\) are the even and odd angular Mathieu functions, \[ ce_m(\nu; q), \quad m = 0, 1, 2, \ldots, \] \[ se_m(\nu; q), \quad m = 1, 2, 3, \ldots, \] The value of \(a\) must be chosen to ensure that the solutions are periodic in the angular elliptic coordinate \(\nu\). There are infinitely many such values, and the choice of the value corresponds to the index \(m\), of the Mathieu function.

The functions are so named because they are analogous to cosine and sine respectively in that the \(ce_m\) are even functions and the \(se_m\) are odd functions.

For \(q>0\), the radial Mathieu function has four independent families of solutions. The first kind are often labelled \(Je_m\), and \(Jo_m\), and are analogous to the Bessel functions \(J_n\). The second kind are often labelled \(Ne_m\), and \(No_m\), and are analogous to Bessel functions of the second kind\(N_n\). We can rule out the \(Ne_m\) and \(No_m\) solutions, as they diverge as \(\mu\) approaches 0.

The functions \(Je_m\) and \(Jo_m\) oscillate in \(q\) and have infinitely many zeros for a given value of \( \mu \). The choice of zero corresponds to the index \(n\) of the solution. In order to respect the boundary condition that the displacement be 0 at the boundary of the drum, we choose \(q\) among one of these zeros when \(\mu\) is equal to its maximal value, corresponding to the boundary of the drum.

Putting the solutions together, we obtain the following family of fundamental modes: \[ Ze_{m,n} = Je_m(\mu; q_n)ce_m(\nu; q_n)cos(\omega t), \] \[ Zo_{m,n} = Jo_m(\mu; q_n)se_m(\nu; q_n)cos(\omega t), \]

You might wonder, as I did, why we could not have the combinations \(Je_m(\mu; q_n)se_m(\nu; q_n)\) and \(Jo_m(\mu; q_n)ce_m(\nu; q_n)\). When I plugged these formulae into the visualization, it was immediately clear that these functions had singularities at \(\mu = 0\), which corresponds to a line connecting the two foci of the ellipse. This problem highlights an interesting aspect about elliptic coordinates, which is that \(\mu = 0\) does not correspond to a point, but rather to a line, and therefore smoothness of functions in elliptic coordinates must be checked carefully there.

In the visualization, the parameter \(m\) is the order of the Mathieu function, \(n\) determines which zero of the Mathieu function is chosen for the parameter \(q\), and \(f\) indicates the position of the right-hand focus of the ellipse. The isOdd parameter toggles between the odd and even modes.

For small values of \(f\), we see that the vibrations converge to those of a circular drum. Setting the parity to odd in this case rotates the waves by 90 degrees. It is interesting to see how the waves take on a different character as the focal distance increases. Instead of the waves occuring in a radial and angular pattern, they take on a more grid-like character, aligning themselves with the major and minor axes of the ellipse.

Implementation Notes

This is my first Vinequai post in a long time. It was time-consuming and cognitively taxing to make them. The introduction of AI-powered tools inspired me to create a new blog post, and I was pleased to discover the AI tools made the task significantly easier.

I couldn't find any code that implemented the Mathieu functions in Javascript / Typescript. As a result, I needed to use scipy to compute the Mathieu functions and so this is the first Vinequai post to make direct use of Python. Getting Python to work in the browser and interoperate with my Typescript code was a lot easier than I thought, and I used Pyodide to do this. You may have noticed that the visualization takes some time to load and the reason is that it takes some time to load Pyodide and scipy.

Have suggestions?

Send any ideas for visualizations that you would like to see to [email protected].