# A ball that rings A mode of a ball that is held on its surface, in a section through its axis: two lobes along the axis and a belt around it. ```python import sympy as sp import pdemagic as pm r, theta, alpha = sp.symbols("r theta alpha", real=True) E = sp.Symbol("E") v = sp.Function("v")(r, theta, alpha) ball = pm.Problem( sp.Eq(-pm.laplacian(v), E * v), domain=pm.Ball(r, theta, alpha), boundary=sp.Eq(v, 0), eigenvalue=(E, 9), ) pm.solve(ball).plot(state=4) ``` ## What it shows The modes of a ball, in spherical coordinates: $-\nabla^2 v = E\,v$ with the value zero on the surface. Each mode is a radial function times a spherical harmonic. The lowest is round, with $E = \pi^2$. Then come three with one nodal plane, which share $E = 20.19$, and five with two nodal surfaces, which share $E = 33.22$. The picture shows the first of those five, in the plane through the axis: it has one sign towards the two poles and the other in a belt around the equator. The eigenvalues are the squares of the zeros of the spherical Bessel functions. ## What pdemagic decided The planner chose the modes of the ball (`collocation_modes`): each is the product of a spherical harmonic and a radial mode for its degree, from collocation at Gauss points along the radius, sorted by their eigenvalue. The grid has 24 points along the radius, 24 along the angle from the axis and 48 around it. Modes that share an eigenvalue are returned as real functions that are orthogonal to each other. ## More - [Modes of cavities, drums and waveguides](../topics/modes.md) - [Disks, rings, balls, shells and cylinders](../topics/round.md) - [The modes of boxes and round domains](../methods/cavity-modes.md) - [What is solved on round domains](../ref/equations-round.md)