Grid Cell Demo 02: Three-Wave Interference and Spatial Autocorrelogram
May 13, 2026·
·
2 min read
Shaoyang Cui
This page strips away the rat trajectory and keeps only the theoretical three-wave construction.
The question here is:
- if three direction-tuned waves interfere in space, what firing map does that imply?
- once that firing map is built, what does its spatial autocorrelogram look like?
The demo below now exposes a broader family of deformations. You can adjust:
betaand the threek_iscales for anisotropic wavelength changestheta_1,theta_2,theta_3for angle distortionsA_1,A_2,A_3for amplitude imbalancestretch x,stretch y, andshearfor global affine deformationcoord warpandphase warpfor position-dependent distortionamp modulationfor spatially varying amplitude biasbaselineandthresholdfor excitability / threshold effects
The left panel shows the theoretical firing pattern itself. The right panel shows the spatial autocorrelogram computed from that map. I also display a simple gridness estimate, so the demo can be used not only qualitatively but also as a first quantitative probe of how each deformation changes hexagonal order.
This demo turns the hypotheses in the note into explicit parameters. You can deform wave lengths, wave angles, amplitudes, affine geometry, nonlinear phase warp, and thresholding, then inspect both the firing map and its spatial autocorrelogram.
Gridness
0.000
Ring Radius
0
R60 / R30
0.000 / 0.000
Theoretical Firing Pattern
The firing map after three-wave interference, amplitude modulation, affine distortion, coordinate warp, phase warp, baseline shift, and thresholding.
Spatial Autocorrelogram
The normalized spatial autocorrelogram. Gridness is computed from rotational correlations on the first ring around the center peak.