Cube Rotation
A Cube is composed by a face list of squares.
The total number of vertices is number of face* 4 = 24. The vertices algorithm is:
v[0] = len;
v[1] = len;
v[2] = len;
v[3] = len;
v[4] = 0;
v[5] = len;
v[6] = len;
v[7] = 0;
v[8] = 0;
v[9] = len;
v[10] = len;
v[11] = 0;
v[12] = 0;
v[13] = len;
v[14] = 0;
v[15] = 0;
v[16] = len;
v[17] = len;
v[18] = 0;
v[19] = 0;
v[20] = len;
v[21] = 0;
v[22] = 0;
v[23] = 0;
The number of faces is 6. The face list algorithm is:
face[0]= face list of pts(0,1,2,3);
face[1]= face list of pts (0,3,4,5);
face[2]= face list of pts (3,4,7,2);
face[3]= face list of pts (4,5,6,7);
face[4]= face list of pts (0,1,6,5);
face[5]= face list of pts (1,2,7,6);