Complex 3D patterns can be ‘written’ in a gel that switches between solid and liquid states