3 * helicoid (gernalized torus) demo
6 * This code provides a very simple example of the helicoid primitive.
7 * Most of this code is required to set up OpenGL and GLUT, and very
8 * very little to set up the helix drawer. Don't blink!
10 * =======> MOUSE HOOKED UP TO RADIUS, DELTA-RADIUS < ========
13 * Written by Linas Vepstas, March 1995
16 /* required include files */
21 /* most recent mouse postion */
28 void InitStuff_helix2 (void)
32 /* draw the helix shape */
33 void DrawStuff_helix2 (void)
35 glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
36 glColor3f (0.6, 0.3, 0.8);
38 /* set up some matrices so that the object spins with the mouse */
40 glTranslatef (0.0, 0.0, -80.0);
41 glRotatef(rot_x, 1, 0, 0);
42 glRotatef(rot_y, 0, 1, 0);
43 glRotatef(rot_z, 0, 0, 1);
44 /* glRotatef (220.0, 0.0, 1.0, 0.0); */
45 /* glRotatef (65.0, 1.0, 0.0, 0.0); */
47 /* Phew. FINALLY, Draw the helix -- */
48 gleSetJoinStyle (TUBE_NORM_EDGE | TUBE_JN_ANGLE | TUBE_JN_CAP);
49 gleHelicoid (0.01*lastx,
50 6.0, (0.01*lasty - 2.0),
51 -3.0, 4.0, 0x0, 0x0, 0.0, 1080.0);
56 /* ------------------------- end of file ----------------- */