There's the possibility that I just didn't the original version conceptually, but I believe it contains an issue with n_tall calculation and pixel placement:
n_tall didn't give me the expected calculated n_tall value (for a real-life example based on AdaFruits bendable Neopixel array). Seems n_tall is calculated with the diameter of the cylinder instead of the radius.
with n_around to n_tall ratios that in the physical setup result in "square" pixels, vertical pixel spacing in the layout would appear to be double of the horizontal spacing. Although the comment in the code says the z axis is calculated from -h/2 to h/2, in reality it extended from -1 to 1 for height=1. Also with the new formula, the special handling for n_tall=1 is not required.
There's the possibility that I just didn't the original version conceptually, but I believe it contains an issue with n_tall calculation and pixel placement: