Programmable Foam