gcc says: error: iteration 2147483649 invokes undefined behavior [-Werror=aggressive-loop-optimizations] which of course, never happens because ncols is always >= 2. Add some assertions to tell the compiler.
Add some comments to the math in the transforms demo.
This demo uses transforms to place icons on a sphere.