added missing radius multiplication factor to sphere code
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Aug 2000 20:36:34 +0000 (20:36 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Aug 2000 20:36:34 +0000 (20:36 +0000)
progs/demos/bounce.c

index 1c0c550..d97791b 100644 (file)
@@ -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);