Spiral k-space scanning is an important research area
in MRI. There are numerous references for designing
spiral gradient waveforms, including Meyer (1992),
King (1995), Pipe (1999), and Glover (1999).
I included a brief description of spiral waveform design
in my thesis -
Section 6.2.1 .

This page contains code for Matlab design of variable-density
spiral waveforms, a slightly-expanded version of what is
described in the above PDF file. A sample variable-density
spiral is shown below.
You are welcome to use this code for anything you wish!

(Click on image to enlarge)

Functions Included

The tar file includes numerous .m scripts, and
a .c code that can be compiled to a .mex function.

vds.m -- Matlab script version of variable-density
spiral design. Supporting function is q2r21.m.

vdsmex.m -- Matlab script wrapper for vds_mex.c, which
is newer, faster and hopefully better than vds.m.

vds_mex.c -- Mex interface to C-code in vds.c

vds.c -- C-functions to generate variable-density spirals.

Save the tar file, vdspiral.tar.gz
to your computer. To extract the files, execute "tar -xzvf vdspiral.tar.gz"
from the directory where you have saved the file.

For a very
simple design, simply type, "g = vdsmex(20)" in Matlab.