Computational Methods for Gravitational Lensing