1% A triaxial ellipsoid: the sphere with each axis scaled independently.
2%
3% Still degree-1 in the spherical harmonics — scaling a coordinate scales its
4% coefficients — so the surface the solver sees is exactly the one written
5% here, with nothing lost to band-limiting. The simplest geometry that is not
6% the sphere, and the one whose curvature is easiest to reason about.
8function [gx, gy, gz] = shape(theta, phi, ax, ay, az)
9 st = sin(theta);
10 gx = ax * (st .* cos(phi));
11 gy = ay * (st .* sin(phi));
12 gz = az * cos(theta);
13end