  This paper presents the results of a comprehensive study on the optimization
of the optical system for independent amplitude and phase wavefront
manipulation, which is based on a digital micromirror device implementation.
The parameters of generated binary fringe patterns to reach the optimal quality
of target complex-valued wavefront have been found for several examples, and a
general algorithm for DMD pattern optimization is described. It was shown that
a trade-off between spatial resolution and quantization of the target amplitude
and phase distribution should be achieved. The increase of carrier frequency
results in higher spatial resolution of the modulated complex wave but
decreases its quantization. The dependence of the best DMD-pattern generation
parameters on the type of target complex wavefront is discussed in terms of
spatial resolution and quantization degree.
