PDA

View Full Version : convert cube to cylinder



vamsigp
12-03-2015, 12:03 AM
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 = radius*cos(angle)
y = radius(Y),
z = radius*sin(angle)

calculating the angle based on number of slices.

Please help me