We describe an experimental technique to generate a quasi-monochromatic field with any arbitrary spatial coherence properties that can be described by the cross-spectral density function, W (r 1 , r 2 ). This is done by using a dynamic binary amplitude grating generated by a digital micromirror device (DMD) to rapidly alternate between a set of coherent fields, creating an incoherent mix of modes that represent the coherent mode decomposition of the desired W (r 1 , r 2 ). This method was then demonstrated experimentally by interfering two plane waves and then spatially varying the coherence between them. It is then shown that this creates an interference pattern between the two beams whose fringe visibility varies spatially in an arbitrary and prescribed way.