Cube to sphere

It seemed to me that the purpose of your code was only to change the shape of a model; my apologies if I misunderstood.
If your intent is to simultaneously process the vertex data for other purposes as well, then you are right, of course.