Free-electron lasers (FELs) have been built ranging in wavelength from long-wavelength oscillators using partial wave guiding through ultraviolet through hard x-ray that are either seeded or start from noise. In addition, FELs that produce different polarizations of the output radiation ranging from linear through elliptic to circular polarization are currently under study. In this paper, we develop a three-dimensional, time-dependent formulation that is capable of modeling this large variety of FEL configurations including different polarizations. We employ a modal expansion for the optical field, i.e., a Gaussian expansion with variable polarization for free-space propagation. This formulation uses the full Newton-Lorentz force equations to track the particles through the optical and magnetostatic fields. As a result, arbitrary three-dimensional representations for different undulator configurations are implemented, including planar, helical, and elliptical undulators. In particular, we present an analytic model of an APPLE-II undulator to treat arbitrary elliptical polarizations, which is used to treat general elliptical polarizations. To model oscillator configurations, and allow propagation of the optical field outside the undulator and interact with optical elements, we link the FEL simulation with the optical propagation code OPC. We present simulations using the APPLE-II undulator model to produce elliptically polarized output radiation, and present a detailed comparison with recent experiments using a tapered undulator configuration at the Linac Coherent Light Source. Validation of the nonlinear formation is also shown by comparison with experimental results obtained in the Sorgente Pulsata Auto-amplificata di Radiazione Coerente SASE FEL experiment at ENEA Frascati, a seeded tapered amplifier experiment at Brookhaven National Laboratory, and the 10 kW upgrade oscillator experiment at the Thomas Jefferson National Accelerator Facility. dimensional simulation of elliptically polarized radiation from a FEL. Particle dynamics are treated using the full Newton-Lorentz force equations to track the particles through the optical and magnetostatic fields. The optical field is described by a superposition of Gaussian modes, and the formulation tracks the particles and fields as they propagate along the undulator line from the start-up through the (linear) exponential growth regime and into the nonlinear post-saturation state. The formulation includes three-dimensional descriptions of linearly polarized, helically polarized, and elliptically polarized undulators including the fringing fields associated with the entry/exit transition regions. Additional magnetostatic field models for quadrupoles and dipoles are also included. For convenience, we refer to the formulation and simulation code as MINERVA. It is important to remark that the use of the full Newton-Lorentz orbit analysis allows MINERVA to treat self-consistently both the entry/exit taper regions of undulators, and the generation of harmonics of the fundam...