In principle, diffractive elements can be designed to control a propag
ating wave in three dimensions, but no general procedure has been prop
osed. We present an iterative method that is suitable for the design o
f such diffractive elements. The resulting complex amplitude distribut
ion will approach any arbitrary requirement, as much as is permitted b
y basic physical principles. The problem of ''nondiffracting-beam'' pr
opagation is analyzed as a special case, and intensity peaks are gener
ated that propagate as much as 4 m with a bounded width. The generalit
y of the method, as compared with other techniques, is demonstrated by
the design of an array of nondiffracting beams.