convert cube to cylinder

Hello, i am doing a android project in which i have to convert the texture cube to texture cylinder and back.

in standstill, the image should be mapped to a cube but during animation it should convert to cylinder and rotate and again come back to cube.

I have created the cylinder and rotation is working fine, but the transition is not smooth from cube to cylinder it an abrupt cylinder.

Cylinder - i am generating the vertices with

x = radiuscos(angle)
y = radius(Y),
z = radius
sin(angle)

calculating the angle based on number of slices.

Please help me