One of the major motifs in collective or swarm intelligence is that, even though individuals follow simple rules, the resulting global behavior can be complex and intelligent. In artificial swarm systems, such as swarm robots, the goal is to use systems that are as simple and cheap as possible, deploy many of them, and coordinate them to conduct complex tasks that each individual cannot accomplish. Shape formation in artificial intelligence systems is usually required for specific task-oriented performance, including 1) forming sensing grids, 2) exploring and mapping in space, underwater, or hazardous environments, and 3) forming a barricade for surveillance or protecting an area or a person. This paper presents a dynamic model of an artificial swarm system based on a virtual spring damper model and algorithms for dispersion without a leader and line formation with an interim leader using only the distance estimation among the neighbors.