JUGGLE.EXE  by Michael Kleber, Harvard University, Nov. 1991.

Juggle.exe is a graphical simulator for juggling patterns.
When given a pattern, juggle creates bitmap pictures of the balls
it will use, calculates in advance the positions the balls will have
to be in, and animates the pattern until a key is pressed.

A pattern is a string of tosses.  A toss is represented by a number,
specifying how long the ball is to stay in the air, and may optionally
be followed by a ' (apostrophe), indicating that it is an outside toss.
Numbers of more than one digit must be encloed in parentheses.  The
letters a-z can be used as shorthand for the numbers 10-35, and do not
need parens.

A pattern is legal if and only if it does not require two or more balls
to be caught at the same time.  For a legal pattern, the average of the
numbers is the amount of time the average ball is in the air, and so is
also the number of balls used in the pattern.  Balls are always thrown from
alternating hands (juggle only simulates such "steady-rhythm" patterns),
and therefore odd-height throws always cross, which even-height throws
are caught by the hand which threw them.

When it asks you for a pattern, typing ? will allow you to modify the
behavior of the program.  Currently, you can change:

- The number of frames of animation per juggling "beat", which controls
  the speed and quality of the animation (more frames = slower, smoother).
  My machine (12 MHz 286, EGA) looks best with 12, so that's default.

- How many beats between when a ball is caught and when it is thrown.
  Default is 1.5, and real live jugglers seem to all be between 1.5 and 2.
  Two minus this number is how long the hand is empty.

A few other options are currently hard-wired in, though they might become
user-available in the future.


Juggle.exe is written in Borland Turbo C++, but should be relatively easy
to port: almost all code is standard ANSI C, and the bits that aren't deal
with the graphics interfacing and keyboard I/O.  If you can bitmap images
and XOR them onto a graphics screen, and can detect a keypress, then you
can port juggle.exe.  I plan to have a Mac version real soon now.


For starters, here are a few interesting patterns.  All of them can
be generalized to having more balls, but you get to figure out how.
The outside throws (') are purely aesthetic, and irrelevant to the math.

3, 4, 5... -- standard 3, 4, 5... ball juggling.
33'        -- half-shower, but the program can't exaggerate it well.
333'       -- juggler's tennis.  Also would benefit from exaggeration.
5'1        -- a 3-ball shower.  5'1 is prettier than 51.
441        -- really pretty 3-ball pattern, and not that hard.
5551       -- looks like 5 balls, but not quite.  Freaks real jugglers out.
51414      -- another cute 3-ball pattern.
34'5       -- doesn't look that hard, and is very cute.  Wish I could do it.
3339'9'9'  -- doing 6 balls the *hard* way.


Needless to say, experiment away; that's why I wrote the thing, after all.
E-mail about the program-- comments, suggestions, bugs (theoretically :-),
etc-- or about the mathematics of jugging in general is always welcome.
I'm a junior now; at least until I graduate ('93), I should be reachable at
kleber@math.harvard.edu (preferred) or kleber@huma1.bitnet.  Enjoy!
