  Shape formation is a basic distributed problem for systems of computational
mobile entities. Intensively studied for systems of autonomous mobile robots,
it has recently been investigated in the realm of programmable matter. Namely,
it has been studied in the geometric Amoebot model, where the anonymous
entities, called particles, operate on a hexagonal tessellation of the plane
and have limited computational power (they have constant memory), strictly
local interaction and communication capabilities (only with particles in
neighboring nodes of the grid), and limited motorial capabilities (from a grid
node to an empty neighboring node); their activation is controlled by an
adversarial scheduler. Recent investigations have shown how, starting from a
well-structured configuration in which the particles form a (not necessarily
complete) triangle, the particles can form a large class of shapes. This result
has been established under several assumptions: agreement on the clockwise
direction (i.e., chirality), a sequential activation schedule, and
randomization (i.e., particles can flip coins).
  In this paper we provide a characterization of which shapes can be formed
deterministically starting from any simply connected initial configuration of
$n$ particles. As a byproduct, if randomization is allowed, then any input
shape can be formed from any initial (simply connected) shape by our algorithm,
provided that $n$ is large enough.
  Our algorithm works without chirality, proving that chirality is
computationally irrelevant for shape formation. Furthermore, it works under a
strong adversarial scheduler, not necessarily sequential. We also consider the
complexity of shape formation in terms of both the number of rounds and of
moves performed by the particles. We prove that our solution has a complexity
of $O(n^2)$ rounds and moves: this number of moves is also asymptotically
optimal.
