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 SWEEP, HEIGHT < ========
13 * Written by Linas Vepstas, March 1995
16 #include "extrusion.h"
18 /* controls shape of object */
22 void InitStuff_helix3 (void)
26 /* draw the helix shape */
27 void DrawStuff_helix3 (void)
29 glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
30 glColor3f (0.8, 0.3, 0.6);
32 /* set up some matrices so that the object spins with the mouse */
34 /* glTranslatef (0.0, 0.0, -80.0); */
35 /* glRotatef (220.0, 0.0, 1.0, 0.0); */
36 /* glRotatef (65.0, 1.0, 0.0, 0.0); */
38 /* Phew. FINALLY, Draw the helix -- */
39 gleSetJoinStyle (TUBE_NORM_EDGE | TUBE_JN_ANGLE | TUBE_JN_CAP);
40 gleHelicoid (1.0, 6.0, -1.0,
41 0.0, (0.02*lasty-2.0), 0x0, 0x0, 0.0, 6.0*lastx);
46 /* ------------------------- end of file ----------------- */