Egocentric Head Direction Encoding and Perception Model Based on an Adaptive Ring Attractor Network | Synapse