General and effective approach to the synthesis of shaped reflector antennas