A coordinates mixing matrix-based model for swarm formation