We devise self-organizing model of the striate cortex that learns orientation maps by sparse coding of natural images. The model assumes the existence of oriented receptive fields and of retinotopic mapping. We demonstrate that learning sparse representations of natural images leads to the formation of spatially periodic orientation maps. If and only if the sparseness of the representation is sufficiently high, these orientation maps reproduce different critical parameters of experimentally measured maps in the striate cortex. We conclude the functional topology of the visual cortex that may be tailored to optimize the encoding of natural stimuli with minimal redundancy of the underlying representation.