In retrograde tracing experiments to determine the mapping of connections from the retina to the superior colliculus in mammals , dye is injected at a point in the superior colliculus and allowed to diffuse retrogradely down the axons of retinal ganglion cells to their cell bodies in the retina. The retina is then dissected and flattened, and the pattern of dye in cell bodies can be seen in the flattened retina. In the process of flattening the retina, a number of incisions are made and tearing occurs. The pattern of dye can be spread across incisions and tears in the flattened retina, complicating analysis of the mapping. One way of simplifying the analysis would be to infer the positions of the cell bodies in the spherical coordinate system of the intact retina from their positions in the flattened retina. We present a method to achieve this approximately by minimization of an energy function. A triangular grid is laid over the flattened retina. The coordinates of the grid are then transformed so that they lie on a partial sphere with the correct dimensions for the intact retina, and the transformation is then adjusted so as to minimize the sum of the squared differences between the lengths between corresponding pairs of adjacent points on the flattened and intact retinae. The method is able to produce a transformation that is sufficiently good for visualization.