-/*
-static GLfloat vdata[12][3] =
-{
- {-X, 0.0, Z }, { X, 0.0, Z }, {-X, 0.0, -Z}, {X, 0.0, -Z },
- { 0.0, Z, X }, { 0.0, Z, -X}, {0.0, -Z, -X}, {0.0, -Z, -X},
- { Z, X, 0.0 }, { -Z, X, 0.0}, {Z, -X, 0.0 }, {-Z, -X, 0.0}
-};
-
-static GLuint tindices[20][3] =
-{
- {0,4,1}, {0,9,4}, {9,5,4}, {4,5,8}, {4,8,1},
- {8,10,1}, {8,3,10}, {5,3,8}, {5,2,3}, {2,7,3},
- {7,10,3}, {7,6,10}, {7,11,6}, {11,0,6}, {0,1,6},
- {6,1,10}, {9,0,11}, {9,11,2}, {9,2,5}, {7,2,11}
-};*/
-
-/* -------------------------------------------------------------
- This section contains the code that generates a yellow
- Icosahedron. It's under development... (of Course)
-______________________________________________________________*/
-/*
-void NormalizeVector(float v[3])
-{
- GLfloat d = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
- if (d == 0.0)
- {
- printf("zero length vector\n");
- return;
- }
- v[0] /= d;
- v[1] /= d;
- v[2] /= d;
-}
-
-void drawTriangle(float *v1, float *v2, float *v3)
-{
- xglBegin(GL_POLYGON);
- //xglBegin(GL_POINTS);
- xglNormal3fv(v1);
- xglVertex3fv(v1);
- xglNormal3fv(v2);
- xglVertex3fv(v2);
- xglNormal3fv(v3);
- xglVertex3fv(v3);
- xglEnd();
-}
-
-void subdivide(float *v1, float *v2, float *v3, long depth)
-{
- GLfloat v12[3], v23[3], v31[3];
- GLint i;
-
- if (!depth)
- {
- drawTriangle(v1, v2, v3);
- return;
- }
- for (i = 0; i < 3; i++)
- {
- v12[i] = (v1[i] + v2[i]);
- v23[i] = (v2[i] + v3[i]);
- v31[i] = (v3[i] + v1[i]);
- }
- NormalizeVector(v12);
- NormalizeVector(v23);
- NormalizeVector(v31);
- subdivide(v1, v12, v31, depth - 1);
- subdivide(v2, v23, v12, depth - 1);
- subdivide(v3, v31, v23, depth - 1);
- subdivide(v12, v23, v31,depth - 1);
-
-} */
-/*
-void display(void)
-{
- int i;
- xglClear(GL_COLOR_BUFFER_BIT);
- xglPushMatrix();
- xglRotatef(spin, 0.0, 0.0, 0.0);
- xglColor3f(1.0, 1.0, 0.0);
-// xglBegin(GL_LINE_LOOP);
- for (i = 0; i < 20; i++)
- {
-
- //xglVertex3fv(&vdata[tindices[i][0]][0]);
- //xglVertex3fv(&vdata[tindices[i][1]][0]);
- //xglVertex3fv(&vdata[tindices[i][2]][0]);