Surface coding based on Morse theory | Synapse