  Many proposals have already been made for realizing programmable matter,
ranging from shape-changing molecules, DNA tiles, and synthetic cells to
reconfigurable modular robotics. Envisioning systems of nano-sensors devices,
we are particularly interested in programmable matter consisting of systems of
simple computational elements, called particles, that can establish and release
bonds and can actively move in a self-organized way, and in shape formation
problems relevant for programmable matter in those self-organizing particle
systems (SOPS). In this paper, we present a general algorithmic framework for
shape formation problems in SOPS, and show direct applications of this
framework to the problems of having the particle system self-organize to form a
hexagonal or triangular shape. Our algorithms utilize only local control,
require only constant-size memory particles, and are asymptotically optimal
both in terms of the total number of movements needed to reach the desired
shape configuration.
