The methods devised by Gustav Mie in 1908 to explain the scattering of electromagnetic waves have a close analogy with quantum-mechanical models developed many years later to describe nuclear scattering. In particular, these models use either a complex index of refraction or a complex nuclear scattering potential to account for attenuation caused by non-elastic scattering. We briefly outline the historical development of these models and give examples illustrating the close analogy between them, their parameters, and the resulting scattering. In both models, the ratio of the incident wavelength to the object size, λ/D, can be determined from the scattering characteristics, allowing the extraction of microscopic particle dimensions. This close analogy allows students to simulate accelerator-based nuclear scattering experiments with table-top optical-scattering experiments.