Synthesis of sparse arrays radiating shaped beams