Grid Cell Demo 02: Three-Wave Interference and Spatial Autocorrelogram

May 13, 2026·
Shaoyang Cui
Shaoyang Cui
· 2 min read

This page strips away the rat trajectory and keeps only the theoretical three-wave construction.

The question here is:

  1. if three direction-tuned waves interfere in space, what firing map does that imply?
  2. 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:

  • beta and the three k_i scales for anisotropic wavelength changes
  • theta_1, theta_2, theta_3 for angle distortions
  • A_1, A_2, A_3 for amplitude imbalance
  • stretch x, stretch y, and shear for global affine deformation
  • coord warp and phase warp for position-dependent distortion
  • amp modulation for spatially varying amplitude bias
  • baseline and threshold for 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.