Orbital magnetism in the ballistic regime: geometrical effects