31
31
#define M_PI 3.14159265358979323846
34
/* controls shape of object */
34
35
extern float lastx;
35
36
extern float lasty;
41
39
/* =========================================================== */
43
41
#define NUM_TOID1_PTS 5
44
double toid1_points[NUM_TOID1_PTS][3];
45
float toid1_colors [NUM_TOID1_PTS][3];
46
double toid1_twists [NUM_TOID1_PTS];
42
static double toid1_points[NUM_TOID1_PTS][3];
43
static float toid1_colors [NUM_TOID1_PTS][3];
44
static double toid1_twists [NUM_TOID1_PTS];
48
46
#define TSCALE (6.0)
113
111
#define NUM_TWIS_PTS (20)
115
double twistation [NUM_TWIS_PTS][2];
116
double twist_normal [NUM_TWIS_PTS][2];
113
static double twistation [NUM_TWIS_PTS][2];
114
static double twist_normal [NUM_TWIS_PTS][2];
118
void init_tripples (void)
116
static void init_tripples (void)
185
183
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
185
glFrontFace(GL_CW); /* jwz */
187
187
/* set up some matrices so that the object spins with the mouse */
189
glTranslatef (0.0, 0.0, -80.0);
190
glRotatef(rot_x, 1, 0, 0);
191
glRotatef(rot_y, 0, 1, 0);
192
glRotatef(rot_z, 0, 0, 1);
193
/* glRotated (43.0, 1.0, 0.0, 0.0); */
194
/* glRotated (43.0, 0.0, 1.0, 0.0); */
189
/* glTranslatef (0.0, 0.0, -80.0); */
190
/* glRotated (43.0, 1.0, 0.0, 0.0); */
191
/* glRotated (43.0, 0.0, 1.0, 0.0); */
195
192
glScaled (1.8, 1.8, 1.8);
196
193
gleTwistExtrusion (NUM_TWIS_PTS, twistation, twist_normal,
197
194
NULL, NUM_TOID1_PTS, toid1_points, NULL, toid1_twists);