How would I create these meshes on a curve?

It would probably work better with a spline: