The pioneering cell biologist Michael Abercrombie first described the process of contact inhibition of locomotion more than 50 years ago when migrating fibroblasts were observed to rapidly change direction and migrate away upon collision. Since then, we have gleaned little understanding of how contact inhibition is regulated and only lately observed its occurrence in vivo. We recently revealed that Drosophila macrophages (haemocytes) require contact inhibition for their uniform embryonic dispersal. Here, to investigate the role that contact inhibition plays in the patterning of haemocyte movements, we have mathematically analysed and simulated their contact repulsion dynamics. Our data reveal that the final pattern of haemocyte distribution, and the details and timing of its formation, can be explained by contact inhibition dynamics within the geometry of the Drosophila embryo. This has implications for morphogenesis in general as it suggests that patterns can emerge, irrespective of external cues, when cells interact through simple rules of contact repulsion.