The differential geometry of perceptual similarity