static void init_toid1_line (void) { int i; i=0; TPTS (-1.1, 0.0); TPTS (-1.0, 0.0); TPTS (0.0, 0.0); TPTS (1.0, 0.0); TPTS (1.1, 0.0); i=0; TCOLS (0.8, 0.8, 0.5); TCOLS (0.8, 0.4, 0.5); TCOLS (0.8, 0.8, 0.3); TCOLS (0.4, 0.4, 0.5); TCOLS (0.8, 0.8, 0.5); i=0; TXZERO (); TXZERO (); TXZERO (); TXZERO (); TXZERO (); }
static void draw_twist (void) { int i; toid1_twists[2] = (double) (mx-121) / 8.0; i=3; /* TPTS (1.0, ((double)my) /400.0); TPTS (1.1, 1.1 * ((double)my) / 400.0); */ TPTS (1.0, -((double)(my-121)) /200.0); TPTS (1.1, -1.1 * ((double)(my-121)) / 200.0); #ifdef IBM_GL_32 rotate (230, 'x'); rotate (230, 'y'); scale (1.8, 1.8, 1.8); if (mono_color) { RGBcolor (178, 178, 204); twist_extrusion (NUM_TWIS_PTS, twistation, twist_normal, NULL, NUM_TOID1_PTS, toid1_points, NULL, toid1_twists); } else { twist_extrusion (NUM_TWIS_PTS, twistation, twist_normal, NULL, NUM_TOID1_PTS, toid1_points, toid1_colors, toid1_twists); } #endif #ifdef OPENGL_10 glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* set up some matrices so that the object spins with the mouse */ glPushMatrix (); glTranslatef (0.0, 0.0, -80.0); glRotated (43.0, 1.0, 0.0, 0.0); glRotated (43.0, 0.0, 1.0, 0.0); glScaled (1.8, 1.8, 1.8); gleTwistExtrusion (NUM_TWIS_PTS, twistation, twist_normal, NULL, NUM_TOID1_PTS, toid1_points, NULL, toid1_twists); glPopMatrix (); glutSwapBuffers (); #endif }
void InitStuff (void) { int i; i=0; while (i<22) { TXZERO (); TPTS (-1.1 +((float) i)/10.0, 0.0, 0.0); } i=0; XSECTION (-6.0, 6.0); XSECTION (6.0, 6.0); XSECTION (6.0, 5.0); XSECTION (1.0, 5.0); XSECTION (1.0, -5.0); XSECTION (6.0, -5.0); XSECTION (6.0, -6.0); XSECTION (-6.0, -6.0); XSECTION (-6.0, -5.0); XSECTION (-1.0, -5.0); XSECTION (-1.0, 5.0); XSECTION (-6.0, 5.0); }
void init_spine (void) { int i; int ir, ig, ib; float r, g, b; i=0; TPTS (-1.5, 2.0); /* panhandle */ TPTS (-0.75, 2.0); TPTS (-0.75, 1.38); TPTS (-0.5, 1.25); TPTS (0.88, 1.12); TPTS (1.0, 0.62); TPTS (1.12, 0.1); TPTS (0.5, -0.5); TPTS (0.2, -1.12); /* corpus */ TPTS (0.3, -1.5); /* brownsville */ TPTS (-0.25, -1.45); TPTS (-1.06, -0.3); TPTS (-1.38, -0.3); TPTS (-1.65, -0.6); TPTS (-2.5, 0.5); /* midland */ TPTS (-1.5, 0.5); TPTS (-1.5, 2.0); /* panhandle */ TPTS (-0.75, 2.0); ir = ig = ib = 0; for (i=0; i<NUMPOINTS; i++) { ir += 33; ig +=47; ib +=89; ir %= 255; ig %= 255; ib %= 255; r = ((float) ir) / 255.0; g = ((float) ig) / 255.0; b = ((float) ib) / 255.0; tcolors[i][0] = (r); tcolors[i][1] = (g); tcolors[i][2] = (b); } i=0; BPTS (0.0, 0.0, 0.1); BPTS (0.0, 0.0, 0.0); BPTS (0.0, 0.0, -5.0); BPTS (0.0, 0.0, -5.1); i=0; BCOLS (1.0, 0.3, 0.0); BCOLS (1.0, 0.3, 0.0); BCOLS (1.0, 0.3, 0.0); BCOLS (1.0, 0.3, 0.0); }