I'm new to creating materials in Blender and I'm trying to design a material that resembles the texture of a ringed worm (like an earthworm). I'm applying this material to a mesh created from a Bézier curve. I've experimented with the wave material, but it generates the pattern only along one axis (the y-axis in the picture below). However, I need the rings to align with the normals of the mesh (as I understand the problem). Any ideas how can I achieve this?
This is what I've got:
And this is what I aim to achieve (sorry for the rough drawing). Normals are denoted as N.