Cylinder pixel map

function (pixelCount) {
  var map = [];
  var strands = 16;
  var pixPerRing = 14;
    for (strand = 0; strand < strands; strand++) {
      for (i = 0; i < pixPerRing; i++) {
        c = strand / strands * Math.PI * 2
        if (strand % 2) {
          map.push([Math.cos(c), Math.sin(c), i ])
        } else {
          map.push([Math.cos(c), Math.sin(c), pixPerRing -1 - i ])
        }
      }
    }
  return map
  
}

cylinder

let me know if I got the direction right… I think I goofed it.

1 Like