A method includes receiving, from a probe that comprises electrodes and is positioned inside a cavity in an organ of a patient, (i) proximity signals indicative of proximity of the electrodes to a wall of the cavity, and (ii) position signals indicative of positions of the electrodes within the cavity. Based on the proximity signals and the position signals, at least a portion of a volume of the cavity is represented by a sphere model including multiple spheres. An estimated contour of the wall of the cavity is calculated based on the sphere-model. The estimated contour of the wall is presented to a user.