Winding Number & Vortex Defects in 2D

Click to place +1 (left) or −1 (right) vortex defects on an XY-model field

Grid Size 35×35
Relax Steps 8 per frame

XY model: each site has a phase θ ∈ [0, 2π). The winding number n = (1/2π)∮∇θ·dl around a defect is a topological invariant. Pairs of opposite winding number are bound (KT transition). Arrows show ∇θ (spin orientation). Color: hue = θ. Red dot = +1 vortex, blue dot = −1 antivortex.