Curvature sensing for Adaptive Optics: A computer simulation