concept-collection / mri-spins
mri-spins / README.md
1.1 KBPreviewCodeBlameHistoryRaw

mri-spins#

Interactive 3D demonstration of MRI spin physics.

Live: https://concept-collection.github.io/mri-spins/

A sample of isochromats (sphere or cube) evolves under the Bloch equations in the rotating frame. Apply RF pulses, gradients, and a Larmor frequency offset; adjust T1/T2 relaxation; and view the magnetization as vector arrows or colored balls. A live trace shows the signal (real and imaginary parts of the net transverse magnetization).

A built-in spoiled gradient echo sequence plays out 16 phase-encoded TRs, driving the controls automatically and acquiring signal during the readout windows. Optional gradient sounds click like a real scanner.

Things to try#

Single static page, no build step — three.js is loaded from a CDN. Serve locally with any static file server, e.g. npx serve .