The red lines are control point connections. The outer edge of those controls are generated not really used but index wise they are around the user's inputed grid (unless a actual join happened).
For testing purposes i move them a little to be visible. The ones on the edge are almost like temporary points.
(They let me visually make sure they were not being altered later on with a bad index assignment.)
To be honest though im not really 100% sure myself why they lined up like that,
I think what your seeing is sort of a symetrical math artifact. When its rolled its radius is divided by Pi so that the circumference of the cylinder matches the length of the same sized flat grid.
So i think what your seeing is that many of the points are folded back over themselves exactly as the grid is rolled up (but only in one of the three dimensions i think). They are connected to edges of the respective adjoining vertices visually.
Since the y and z hasn't changed just the x they are right were they would be if unrolled to a flatter surface still well some of them.
Just to give a idea a normal cylinder would be simple but after i set it up there are about 4 other functions that still come into play before the surface gets generated.
bool centered = false;
float centering = .0f;
centering = 0.5f;
controlWidth = inputWidth + 2;
controlHeight = inputHeight + 2;
Vector4 temp = new Vector4[inputWidth * inputHeight];
double pi2 = Math.PI * 2d;
float circumferenceLengthMult = 1f / (float)(Math.PI);
float multy = 1f / (float)(inputHeight - 1);
for (int ty = 0; ty < inputHeight; ty++)
float y = multy * (float)(ty);
for (int tx = 0; tx < inputWidth; tx++)
double multx = 1d / (float)(inputWidth - 1);
double t = multx * (double)(tx) * pi2;
float u = ((float)(Math.Sin(t)) * .5f +.5f) * circumferenceLengthMult - centering;
float v = ((float)(Math.Cos(t)) * .5f +.5f) * circumferenceLengthMult - centering;
Vector4 p = new Vector4(u, y + centering, v, 1f);
temp[(ty * inputWidth + tx)] = p;
CreateOpenControlNetPointArray(temp, inputWidth, inputHeight);
// this is were the edge points are displaced
// we take the extra step here.
Since im trying to get google photos to link images correctly.
I might as well try to post a picture.
What a pain in the ass you have to get a sharable link then goto that.
Then copy that image link location.