This is jug.txt in view mode; [Download] [Up]
JUG(6) GAMES AND DEMOS JUG(6)
NAME
jug - animate juggling patterns
SYNOPSIS
[a|x]jug [ -? -q -s -v ] [ -t<maxTime> ] [ -d<delayTime> ] [
-g<gravity> ] [ -p<clockDivisions> ] [ -x<scale> ] [
-e<verticalScale> ] [ -b[<loopCount>] ] [ pattern ]
DESCRIPTION
jug reads a juggling pattern specified in a special language
and animates the pattern on the output device. Currently
there are three versions of the program jug outputs to ASCII
terminals xjug displays its output on an X window and ajug
works on the Commodore Amiga 500.
OPTIONS
-? -q
Display the usage of the program.
-v Display the version number of the program.
-s Normally the program will run in step mode, that is the
program will pause after each time step waiting for the
user to hit a key or press a mouse button. The program
can be placed into run mode by specifying this flag,
this mode can also be inverted by the 'S' single key
command.
-tmaxTime
The animation will keep going for a number of clock
ticks this can be set with the max-time global variable
or the -t switch. The value will be ignored if the
loop-count varibale is set. The default value is 100.
-ddelayTime
When the animation is running in run mode it pauses for
delayTime seconds between each clock tick. This is
normally set to 0.0 to make the animation continuous.
-ggravity
This sets the gravity varibale, this determines the
force of gravity in use for the animation. If the
gravity varibale is set in the pattern file this will
override the value on the command line. The default
value is 200.
-pclockDivisions
The animation draws clockDivision images for each step,
this makes the animation smoother at the expence of
more calculation. The default value depends on the
graphics system.
Sun Release 4.1 Last change: 5 December 1991 1
JUG(6) GAMES AND DEMOS JUG(6)
-xscale
This sets the relative scale of the drawing.
-everticalScale
This allows the user to extend the vertical exagera-
tion, if for example you wish to create a set of ASCII
images for inclusion in text describing a pattern then
you do not need the full height using this varible you
can draw the patterns in half the lines.
-bloopCount
This sets the loop-count varibale, this determines how
many goto commands are obeyed, for example by setting
the value to one the animation will only go through the
pattern once. If this is set it overrides the max-time
variable.
pattern
This determines the pattern to be shown, if the pattern
is - then it is read from the standard input. If a
pattern name is given the program will attempt to open
a file with that name as the pattern file, if this
fails it will append ".jug" to the name and use that as
the pattern name.
USAGE
The program takes a descrition of juggles and draws them on
the screen. While the animation is running there are a
number of single key commands that the program will respond
to
<Q> Quit the program.
<Space> <Return>
Move to next step if in step mode.
<?> Show a list of single key commands.
<S> Invert the step mode. If in single step mode start run-
ning continuously.
<I> Zoom in closer to the pattern.
<O> Zoom out further away.
LANGUAGE
The juggles are specified using an English like language.
Comments are indicated by a '#', the rest of the line is
treated as a comment. The pattern discription is split into
four elements, first the global variables are set, then the
initial position is described, next the throws to get into
the pattern are described, and finally the pattern itself is
Last change: 5 December 1991 2
JUG(6) GAMES AND DEMOS JUG(6)
described.
The global variables are indicated using the '!' character.
There are a number of variables that can be set
name A string giving the name of the pattern.
max-moves
The number of moves before quiting the program, this is
overridden by the loop-count variable.
loop-count
The number of times to execute the loop or goto command
before quiting the program. If this variable is set it
will override the max-moves variable.
gravity
The value of gravity, by default this is set to 200 but
is altered to deal with objects such as scarfs.
The initial state of the hands is given by specfying the
hand, the objects and the position, for example
right blue black orange
places the blue, black and orange objects in the right hand
left red green at 2
places the red and green objects in the left hand at posi-
tion 2. The hand positions are relative to 0, hand at rest
position, and have 4 as the rest position of the other hand,
so a position of 2 is half way between the hands.
The next component give the moves to get into the pattern,
moves are specified with a time, so for example
0: throw left red towards -2,5
tells the animation at time 0 to throw from the left hand,
with the red object towards the position -2,5 the speed is
specified by the position the object will cross the same
height going down, and time you wish this to occur. So in
this case we know that the red object will be at 0,0 at time
5, since it is being thrown from 2,0 at time 0 with speed
-2,5. So we know that we must add a command
5: catch left
if we want to catch it at time 5 with the left hand in the
rest position.
Last change: 5 December 1991 3
JUG(6) GAMES AND DEMOS JUG(6)
The final component is to specify the pattern using the same
format of commands as we have already seen.
The valid components in the pattern description language are
throw
Throw an object at the specified time.
catch
Catch the nearest object to the specified hand.
move Move a hand without doing anything else.
swap Use a different mapping of hands, useful just before a
loop to do the same thing with the other hand. Can
also be used with balls to do the same thing with dif-
ferent balls.
loop goto
Repeat the pattern from a previous point.
hand Modifier that specifies a hand to use via a number
rather than a symbolic name. Most useful with the swap
command.
ball Modifier that specifies a ball to use via a number
rather than a symbolic name. Most useful with the swap
command.
position at from
Modifier that specifies a location as a triple of
numbers giving the x,y,z position.
speed towards
Modifier that specifies the speed of a throw.
time label
Modifier that specifies the label for a jump.
red green blue yellow violet cyan
An object, these are specified by colour.
left right
A hand, at the moment only two are specified.
BUGS
There are no bugs only features :-)
Last change: 5 December 1991 4
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.