This example shows you how you can shape a cylinder geometry according to your wishes. You only need the appropriate formulas for calculating the coordinates, i.e. a little elementary knowledge of geometry.
Skinned mesh with dynamic knees
Here you can see the position of the vertices and the indices. NumberingHelperExamples
Other examples
TorusFlat
SpiralFromCylinder
SineWaveGrooveRing