Calculate marginal ray slope from pupil definition