An MRI scanner never records a picture directly. Each RF/gradient pulse sequence measures one line of the spatial-frequency spectrum of the anatomy — k-space — and the final image is recovered only after enough lines are collected:
signal at k = ∫∫ M(x,y) · e^(-i2π(kx·x + ky·y)) dx dy
image(x,y) = inverse Fourier transform of k-space(kx,ky)
Gradient coils step the phase- and frequency-encoding gradients so each repetition (TR) traces one horizontal line of k-space at a fixed ky. The center of k-space (low spatial frequency) carries overall contrast and brightness; the periphery (high spatial frequency) carries fine edges and detail — which is why this simulator lets you fill only the center or only the edges to see that split directly.
- Fill k-space — acquires lines top-to-bottom in real scan order; the reconstructed image (right, bottom half of the 3D scene) sharpens as more lines arrive.
- Undersampling — skips every Nth line, the same trick parallel-imaging (SENSE/GRAPPA) and compressed sensing use to scan faster; skipped k-space rows fold aliased copies of the anatomy into the image.
- Motion — adds a random phase error per line, mimicking a patient moving mid-scan; in real MRI this produces the characteristic ghosting/smearing artifact along the phase-encode direction.
- Center only / Edges only — isolates what each region of k-space actually encodes: a blurry-but-correct-contrast image from the center, or a faint high-frequency-only edge map from the periphery.
Real-world relevance: this loop — Fourier acquire, then inverse-Fourier reconstruct — is exactly what every clinical MRI scanner runs, and it is the reason a scan can be sped up (fewer lines) at the direct cost of resolution or artifact-free-ness.