Self-Organization of Mechanical Structure by Cellular Automata