How to design afocal systems