This example demonstrates how to create a gradient that follows a stroke or path of a spiral. This method breaks the stroke into segments and uses stroke-linecap: round;
to make the segments overlay and appear connected. The naive approach might useful if your stroke or path is relatively simple and you do not need a high level of precision.
Similarly, Gradient Along Stroke (Naive) shows how this method could be used in contrast to Mike Bostock's robust miter joint method demonstrated in Gradient Along Stroke.