We show the functional extension of a standard ray tracer to be capable of tracing light fields of different degrees of coherence through complex optical systems. The light fields are represented by spherical waves. An approximate reconstruction of the optical field is possible at arbitrary positions in an optical system under investigation. Therefore, we can calculate the intensity distribution as well as the complex degree of coherence between two points at arbitrary positions. Simulations of the coherence properties of basic optical systems, which can be described analytically, show excellent agreement with theory. Furthermore, we show simulations of the coherence properties of a two-tandem-array microlens beam homogenizer under illumination with fully and partially coherent light.