#include <stdlib.h>#include <math.h>#include <GL/glut.h>#include <tiffio.h>Defines | |
| #define | M_PI 3.14159265358979323846 |
Functions | |
| int | writetiff (char *filename, char *description, int x, int y, int width, int height, int compression) |
| static void | gear (GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) |
| static void | draw (void) |
| static void | init (void) |
| static void | reshape (int width, int height) |
| static void | menu (int value) |
| int | his_main (int argc, char *argv[]) |
Variables | |
| static int | W |
| static int | H |
| static GLfloat | view_rotx = 20.0 |
| static GLfloat | view_roty = 30.0 |
| static GLfloat | view_rotz = 0.0 |
| static GLint | gear1 |
| static GLint | gear2 |
| static GLint | gear3 |
| static GLfloat | angle = 0.0 |
|
|
|
|
|
|
|
||||||||||||||||||||||||
|
Draw a gear wheel. You'll probably want to call this function when building a display list since we do a lot of trig here. Input: inner_radius - radius of hole at center outer_radius - radius at center of teeth width - width of gear teeth - number of teeth tooth_depth - depth of tooth |
|
||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.1