The electromagnetic fields of a triaxial ellipsoid calculated by modal superposition