In certain embodiments, a system for measuring the posterior corneal surface of the cornea comprises cameras and a computer. Each camera generates image data representing a part of the eye posterior to the cornea. The image data describes locations of features of the part. The computer stores a description of the shape of an anterior corneal surface of the cornea, and applies a ray-tracing process to determine the shape of the posterior corneal surface. The ray-tracing process comprises defining rays, where each ray is traced from a camera, through the anterior and posterior corneal surfaces, and to the part of the eye. Constraints for the rays are determined, where the constraints are calculated using the description of the shape of the anterior corneal surface and locations of the features in the image data. Parameters are optimized, and the optimized parameters describe the shape of the posterior corneal surface.