diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-08-16 20:36:34 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-08-16 20:36:34 +0000 |
commit | e716184cae80d8e3b66017e237d68120b6071b53 (patch) | |
tree | 17bd38d9b61b3cda8639ef36ae10a075a84cfcc1 /progs/demos | |
parent | 6f0294ca4706f5edc70c825a4efde860c7ffb7d2 (diff) |
added missing radius multiplication factor to sphere code
Diffstat (limited to 'progs/demos')
-rw-r--r-- | progs/demos/bounce.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/progs/demos/bounce.c b/progs/demos/bounce.c index 1c0c550bea..d97791be5d 100644 --- a/progs/demos/bounce.c +++ b/progs/demos/bounce.c @@ -1,36 +1,13 @@ -/* $Id: bounce.c,v 1.2 2000/06/27 17:04:43 brianp Exp $ */ +/* $Id: bounce.c,v 1.3 2000/08/16 20:36:34 brianp Exp $ */ /* - * Bouncing ball demo. Color index mode only! + * Bouncing ball demo. * * This program is in the public domain * * Brian Paul - */ - -/* Conversion to GLUT by Mark J. Kilgard */ - -/* - * $Log: bounce.c,v $ - * Revision 1.2 2000/06/27 17:04:43 brianp - * fixed compiler warnings - * - * Revision 1.1.1.1 1999/08/19 00:55:40 jtg - * Imported sources - * - * Revision 3.3 1999/03/18 08:16:14 joukj - * - * cmpstr needs string.h to included to avoid warnings - * - * Revision 3.2 1998/11/28 01:13:02 brianp - * now sets an initial window position and size - * - * Revision 3.1 1998/11/28 01:06:57 brianp - * now works in RGB mode by default - * - * Revision 3.0 1998/02/14 18:42:29 brianp - * initial rev * + * Conversion to GLUT by Mark J. Kilgard */ @@ -84,9 +61,9 @@ make_ball(void) glColor3f(1, 1, 1); } - x = COS(b) * COS(a); - y = SIN(b) * COS(a); - z = SIN(a); + x = radius * COS(b) * COS(a); + y = radius * SIN(b) * COS(a); + z = radius * SIN(a); glVertex3f(x, y, z); x = radius * COS(b) * COS(a + da); |