  Mie theory is a powerful method to model electromagnetic scattering from a
multilayered sphere. Usually, the incident beam is expanded to its vector
spherical harmonic representation defined by beam shape coefficients, and the
multilayer sphere scattering is obtained by the T-matrix method. However,
obtaining the beam shape coefficients for arbitrarily shaped incident beams has
limitations on source locations and requires different methods when the
incident beam is defined inside or outside the computational domain or at the
scatterer surface. We propose a 3D angular spectrum method for defining beam
shape coefficients from arbitrary source field distributions. This method
enables the placement of the sources freely within the computational domain
without singularities, allowing flexibility in beam design. We demonstrate
incident field synthesis and spherical scattering by comparing
morphology-dependent resonances to known values, achieving excellent matching
and high accuracy. Additionally, we present mathematical proof to support our
proposal. The proposed method has significant benefits for optical systems and
inverse beam design. It allows for the analysis of electromagnetic
forward/backward propagation between optical elements and spherical targets
using a single method. It is also valuable for optical force beam design and
analysis.
