A metric model for the functional architecture of the visual cortex