A major psychological background is the theory of visual routines, which hypothesize that there exists in the brain a collection of built-in programs, which are coded with a fixed set of basic visual primitives and can be reprogrammed to carry out various visual tasks. I will modify this theory and make it biologically plausible and computationally applicable.