Multiscale modeling of the primary visual cortex