A fundamental question of developmental biology is pattern formation, or how cells with specific gene expression end up in specific locations in the body to form tissues, organs and, overall, functional anatomy. Pattern formation involves communication through extracellular signals and complex intracellular gene networks integrating these signals to determine cell responses (e.g., further signaling, cell division, cell differentiation, etc.). In this article we ask: 1) Are there any logical or mathematical principles determining which gene network topologies can lead to pattern formation by cell signaling over space in multicellular systems? 2) Can gene network topologies be classified into a small number of classes that entail similar dynamics and pattern transformation capacities? In this article we combine logical arguments and mathematical proofs to show that, despite the large amount of theoretically possible gene network topologies, all gene network topologies necessary for pattern formation fall into just three fundamental classes and their combinations. We show that gene networks within each class share the same logic on how they lead to pattern formation and hence, lead to similar patterns. We characterize the main features of each class and discuss how they constitute an exhaustive zoo of pattern-forming gene networks. This zoo includes all gene networks that, to our knowledge, are experimentally known to lead to pattern formation as well as other gene networks that have not yet been found experimentally.