An antenna pattern synthesis technique is presented which permits the design of planar antenna arrays when the array excitation is restricted to have an in-phase amplitude distribution. This technique is applicable to planar arrays of a wide variety of grid structures and can produce a sum pattern with controlled side lobe levels. It is also applicable to difference patterns (if the two halves of the array are excited out of phase). The approach involves minimizing a scalar-valued performance measure, called the cost function, via use of the conjugate gradient method. The unknowns in the cost function are the relative amplitudes of the elements of the array, which are kept positive by being set equal to the squares of real variables. Iteration starts with a uniform amplitude distribution; convergence to the desired pattern is stable and fast.