The term programmable matter refers to matter which has the ability to change its physical properties (shape, density, moduli, conductivity, optical properties, etc.) in a programmable fashion, based upon user input or autonomous sensing. This has many applications like smart materials, autonomous monitoring and repair, and minimal invasive surgery. While programmable matter might have been considered pure science fiction more than two decades ago, in recent years a large amount of research has been conducted in this field. Often programmable matter is envisioned as a very large number of small locally interacting computational particles. We propose the Amoebot model, a new model which builds upon this vision of programmable matter. Inspired by the behavior of amoeba, the Amoebot model offers a versatile framework to model self-organizing particles and facilitates rigorous algorithmic research in the area of programmable matter. We present an algorithm for the problem of coating an infinite object under this model, and prove the correctness of the algorithm and that it is work-optimal.