- } else {
- for (j = -MoebiusTransversals; j < MoebiusTransversals; j++) {
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glBegin(GL_QUAD_STRIP);
- Phi = 0;
- i = 0;
- while (i < (MoebiusDivisions * 2 + 1)) {
- Theta = Phi / 2;
- cPhi = cos(Phi);
- sPhi = sin(Phi);
-
- RotateAaroundU(cPhi, sPhi, 0, -sPhi, cPhi, 0, &Cx, &Cy, &Cz, Theta);
- glNormal3f(Cx, Cy, Cz);
- RotateAaroundU(0, 0, 1, -sPhi, cPhi, 0, &Cx, &Cy, &Cz, Theta);
- j++;
- if (j == MoebiusTransversals || mono)
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite);
- else if (i % 2)
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed);
- else
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray);
- glVertex3f(cPhi * 3 + Cx / MoebiusTransversals * j, sPhi * 3 + Cy / MoebiusTransversals * j, +Cz / MoebiusTransversals * j);
- j--;
- if (j == -MoebiusTransversals || mono)
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite);
- else if (i % 2)
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed);
- else
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray);
- glVertex3f(cPhi * 3 + Cx / MoebiusTransversals * j, sPhi * 3 + Cy / MoebiusTransversals * j, +Cz / MoebiusTransversals * j);
-
- Phi += Pi / MoebiusDivisions;
- i++;
- }
- glEnd();
- }
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);