JONGL specification

Date of issue of this Guide: 10-may-99 ... Jongl Version 7.0 ... Author: Werner (jongl@gmx.net)


What is JONGL?

JONGL is a juggling simulation program. You can watch patterns with one or more jugglers throwing almost anything from balls to chain saws. While the jugglers are doing their pattern you can watch the scene from any view you like using the mouse. Don't forget to try the mouse buttons. More info on my homepage.

Controlling the program
Format of the files read in
Listings of external files

Many thanks to my father Hermann Riebesel who translated this guide (who in view of his old age of over 60, did quite a good job.) [the words in round brackets were added by the translator.]


Controlling the program

The program may be controlled by Mouse, Keyboard and Joystick.

On non-Amigas there is a menue popping up when you click the right mouse button.

(Special feature in the Amiga version:
In order to keep you going, a random selected sample will be played during the performance. The directory where these samples are filed, is defined in jongl.prefs. The samples have to be in the ILBM 8SVX format and have to be looping capable. Presently the program can handle up to 100 samples in this directory. If you don't have such samples or if you want to hear a tracker or other background music, or if you just want to be left in peace, you don't enter the directory in jongl.prefs but no_sound and it is quiet from there on.)


Mouse

With the mouse the position of the observer is being moved on concentric circles around the geometric center of all objects. As a consequence you view actions with high patterns from a higher position. (See option Z=).
Fullscreen mode:

 Mouse left/right:       Observer moves left/right
 Mouse forward/aft:      Observer moves up/down
 Mouse forward/aft and
 - left mouse button     Observer moves toward/away from object
 - right mouse button    Observer's view angle increases/decreases

Window mode:

 left mouse button       rotate / move / steer sun 
                         (depending on the current mode)
 right mouse button      zoom / pop up menue
                         (depending on where you click)
                                                                     

Keyboard

Quite a lot of keys have been assigned to more or less useful functions.

(Only in the AMIGA version you may press other keys than noted here, depending on the keyboard language you use. You should press the key which is labelled with the appropriate key in the english layout. That is because I check the actual key and not the key code which related to a letter.)

This is the list:

A (AMIGA ONLY) Recording mode on/off. (ALL RECORDED) Useful especially for complicated patterns and for AMIGAs without turbo card. A complete cycle of the file will be recorded and replayed (hopefully) at a higher speed. As soon as one cycle has been recorded completely, the accelerated presentation starts. The 'A' near the right screen margin indicates the recording mode.
Changing the viewing angle with the mouse does not work during the recording mode.
Speed adaptation is operative also in the recording mode. The pattern is configured in such a way that it will be presented in real time.
B switches mouse control from rotation to LINEAR movement and back. You can move on tracks other than the concentric spheres, in all six directions of space:
  Mouse left/right:       Observer moves left/right
  Mouse forward/aft:      Observer moves up/down
  Mouse forward/aft and
  - left mouse key:       Observer moves forward/aft
                
  On an Amiga you can use a Joystick in port 2 the same way.

  Whenever you are lost, press 'R'. 
  (One of the more essential inputs to remember.)
C Change objects. The program loads all objects. The user may choose one of them which then will be juggled.
D 3 D mode. You need red-green- or a red-blue-glasses to see the whole scene in 3D. (alpha on non-Amigas)
E Set speed to 0%. The presentation stands still and will resume 100% speed when you press 'W'.
SHIFT-E Set speed to 50%. (See 'E' and 'W'.)
F Show flightpaths of objects. Press F again to switch the same flightpath off. Press TAB to select the next object and F to see its flightpath. All flightpaths off with SHIFT-R or SHIFT-F.
SHIFT-FSwitch off all flight paths.
G Glowball mode.
H make hardcopies. The current screen is dumped into a file. The destination directory is specified in the jongl.prefs. It MUST end with a '/' On an Amiga this function makes use of the "iff.library" from Christian A. Weber from Zürich / Suisse. Works under Linux, doesn't under Windoze.
I simulates infrared vision equipment. The sun is switched off (automatically) and a blurred and strange-coloured picture is shown. Very funny in connection with Z and V. Lots of activity in the presentation will improve the effect. (best on Amiga)
J Spread juggling props on the floor. Just to simulate convention feeling.
K vomiting mode. You are flying 50 cm (1.6404199 feet for you non- Europeans) behind an object chosen at random. Why this is called the vomiting mode, will become apparent latest during the sharp turns while the object is in hand. Press TAB to go to the next object.
L
Amiga wire frame mode. Filled-in polygons are replaced by wire frames and vice versa. A rather boring feature used for slow machines.
Other machines Change language.
M Toggle height scale. One line is 1 metre. The red lines are 5, 10 and 15 metres.
N Toggle fog mode.
O allows to move the sun in azimuth and elevation, in other words, the direction and the angle above the horizon from which the sun is shining. This will change direction and shape of the shadow (see S).
 Mouse left/right:       sun moves anticlockwise/clockwise
 Mouse forward/aft:      sun sinks/rises

If you are currently in the light cone mode, then:
 left mousebutton:  change position of the light cone
 right mousebutton: change the size of the light cone
P Present POSITION of the view point (B=..) and of the observer (G=..) is inserted in the pattern file. When the program is started again, the performance will be seen with this new viewing angle. (Explanation of the parameters see further down, under 'pattern files'.) If you changed the juggled objects interactively, the chosen kind of object will be saved, too. After insertion of the parameters the program continues to run.
SHIFT-P Save last siteswap pattern in jongl notation. The destination directory can be specified with siteswapsavedir = ... in the jongl.prefs.
Q flight queues on / off. Or you can call it motion blur.
R RESET for view point. (if you have fiddled around too much with the above functions...)
SHIFT-R RESET for everything. (if you have fiddled around even more)
S Switch for the SHADING/SHADOW modes:
  0: -- normal
  1: -- objects shaded (getting darker in the distance)
  2: -- everything casts shadows (see 'O')
  3: -- shadows on the floor and shading depending on the
        angle to the sun 
  4: -- light cone with shadows on the floor
SHIFT-S Same as 'S', but other way round.
T Toggle FPS and Speed display.
  The Amiga uses a different mode:         
  +               50 frames per second (not highly probable)
  ++              25 "
  +++             17 "
  ++++5++++0++     4 "
U Cyclic switch for the status line at the bottom of the screen
 (UNDERLINE):
 -- Samples assigned to function keys 
    (if sound is on on the Amiga)
 -- First line of commentary of the presently shown pattern
    and indication of memory remaining
 -- Nothing
V keep an eye on one object while the position of the observer remains unchanged. The object is first chosen at random but may be changed step by step with TAB.
In addition feel free to change the observer's position using the mouse... until you are lost!
Or you may, before starting this mode, press a key on the numeric pad and have one of the jugglers keep an eye on one of the objects.
W Reset speed to 100%. (See 'shift-E' and 'E'.)
X (not Windoze) export animation in one of the following formats (use pop up menu to select)
MPEG or FLI or AnimGIF.
The destination directory can be set via 'hardcopy=' in jongl.prefs
SHIFT-X export Raytracing data for POVRAY. The destination directory can be set in jongl.prefs.
Y
Amiga changes objects into letters or characters or vice versa. Useful for debugging. (Will be explained later.)
Other systems Show additional information in additional window.
Z
Amiga fisheye. There is not much to be said about that. Just play around a bit with zoom and radius. If you still feel well, you may in addition press '1' (on the numeric pad) and 'V'. If that's not enough, press also 'I'. Well...?
Other systemschanges objects into letters or characters or vice versa. Useful for debugging. (Will be explained later.)
1...9,0 on the main keyboard puts juggler number n into the center. The observer may then wander around each of the jugglers while they are passing. Switch off with 'R' or 'B'.
1...9,0 on the numeric pad (Amiga)
F1 .. F10 (other systems)
beams you into the head of the selected juggler. This will prepare you for the feeling that you will have when juggling 15 chain saws all by yourself...
TAB switches from object to object while "keeping an eye on" it. (See 'K' and 'V' and 'F')
+ - play animation faster / slower by 10%
> < play animation faster / slower by 1%
ALT Only on Amigas: Change languages with ALT.
SPACE stops the motion of the observer. Makes it easier to stop the observer during a three-dimensional manoeuvre quickly and at the desired position.
HELP, ? shows what all the keys are supposed to do for you
RETURN or ENTER returns to the pattern menue, so you can select a different pattern without having to leave the program
ESC enables you to get out of this program as fast as possible

It is up to the user to find out how many of these modes he can handle simultaneously.
(NKP means numeric keypad)


Format of the files read in

All files are in the ASCII format. Any amount of whitespace may be included. Even empty lines are allowed (almost) everywhere, except within the definition of the pattern (after the *, see further down).

In this context we distinguish between Object files and Pattern files

Object files

Object files are found in the subdirectory 'o' of the current directory. These are the objects which may be thrown around. There is also another subdirectory called 'o/basic' which defines the static objects. Objects may be built out of the following topics.
                  Points 
                   Lines 
               Triangles 
                Polygons 
                 Spheres 
                   Flags 
                Rotation 
                  Colour 
         Object comments 

Beispiel: o/KeuleLight (Keule = club)

.....................

 r=1

 *

 8 POINTS

 0    0     -.35     #0

 0    0     -.06     #1

 -.06 -.052  .1
  .06 -.052  .1      #2-4
 0     .104  .1

 -.03 -.026  .25
  .03 -.026  .25     #5-7
 0     .052  .25

 10 LINES

 (7 0)   0 1
 (4 0)   1 2
 (4 0)   2 5
 (4 0)   1 3
 (4 0)   3 6
 (4 0)   1 4
 (4 0)   4 7
 (4 0)   5 7
 (4 0)   7 6
 (4 0)   6 5

The club is defined in a vertical attitude with the handle in the 
-Z direction.

....................

The file is divided into two logical blocks. The first one is optional
and may contain one ore more of the following parameters:


h=...   This is the number of points per hand. This value has to be
        defined for a juggler. Otherwise it must not appear. 

k=...   The same, but for the number of points of the head.


r=...   This parameter is of interest only for objects flying around, as
        it defines the Rotation. r=0 means that the object does rotate
        at all (like the potted plant), r=1 means that the object rotates
        like a club.

The dividing character between the two blocks is a *.

Next are at least two of the following sections:

POINTs
LINEs
TRIANGLEs
POLYGONs
SPHEREs
Sections which are not relevant need not be listed. Also the plural for single object parts is not required. That means you may write as well "3 TRIANGLE".

The round brackets within the definitions must not be left out. Their purpose is to aid in the orientation within the program in future versions. (Sounds good, doesn't it?)


Points

POINTS are entered in 3D coordinates in the usual sequence x,y,z. Of course we are working with a right hand coordinate system which means X to the right, Y forward (into the screen) and Z upward.

If you want to see the axes you can select a floor with axes by entering "FLOOR 1" before starting JONGL.

All values are given in units of METRES. (Again for you non-Europeans, one metre is equal to 3.2808398 feet.) Objects which fly like clubs have to be aligned with their handle in the -Z direction. The program rotates them by 90° so that the hand holds them horizontally.
In the following, we refer back to the points. Therefore you have to know that numbering starts with 0. So 13 points run from 0 to 12.

Now we come to Lines.

Lines

As the next step LINES are defined. Each line is defined by its Colour and its Flags. As a consequence, each line can have a different colour. Colour and flags are put in brackets. This will ensure that the files do not have to be changed if the object format is to be expanded later-on.
Starting and end points of lines: In the example above, the first line has the colour 7 and extends between points no. 0 and 1. The next line starts at no. 1 and ends at no. 2; it has the colour 4.

(7 0) 0 1
(4 0) 1 2
Both lines have the flag value 0, that means no bit is set. In other words, currently there are no sensible flags for lines or spheres anyway.

We come to Triangles.

Triangles

TRIANGLES are defined as follows: Colour on the front side (see under Flags), Colour on the rear side, Flags. Finally the three corner points of the triangle.

Example:

(1 2 3) 5 6 7
This triangle has colour 1 on the front side and colour 2 on the rear side. The flags are showing 3. So the bits 0 and 2 are set. The triangle is therefore filled-in and visible from both sides.
The three points of the triangle are 5, 6 and 7.

Now let's look at Polygons.

Polygons

Also for POLYGONS we have first the three parameters "front side Colour" "rear side colour" and Flags, which have been explained already under TRIANGLES.

New with V4.6 is the optional fourth parameter, meaning the number of attached polygons. Those are displayed when the chief polygon is visible. That's the way to define the star on the back of the punk. The attached polygons have to be directly behind the chief polygon.
Next come the corner points of the polygon. Please note that the first point has to be put in again as the last point.

1st example:
(4 5 2)   11 6 7 8 9 11    (Colours 4 & 5; Flag 2; both sides wire frame,
                           the polygon has 5 corners.)
An important restriction for a correct presentation is that only convex polygons can be used. In other words, there cannot be any corners looking inward. Also the polygon has to be in one plane.

Funny effects can be achieved by defining polygons with holes. For this purpose a minus sign (-) and the point numbers are added to the normal definition.


2nd example:

(4 5 3) 11 6 7 8 9 11 - 21 16 17 21
We see that the hole may have a different number of points, but it does not have to. However the hole has to have the same sense of rotation as the polygon!


3rd example:

(4 5 3 4) 1 2 3 4 1     ! this is the chief followed by 4 attached polygons
  (6 6 1) 55 55         ! this is a point
  (1 1 0) 31 33 31      ! this is a line
  (4 3 1) 45 46 47 45   ! this is a triangle
  (15 6 3) 11 12 13 14 15 16 11   ! at last: a polygon
If you have understood everything up to now, you are cleared to get into Spheres.

Spheres

A SPHERE is defined by four parameters: Colour, Flags, point number, radius.

Example:

(4 0) 17 0.06    (Colour 4, flags=0, point number 17, radius 0.06 m)
For the colour we have a special feature: As a return for -1 we get a colour chosen at random. (See also in the object file 'o/ball_random'.)
The point number is the number of the Points which defines the centre of the sphere.
The only flag is bit 4 = 1 which switches off the light reflections. See the use of this in the object "o/basic/Charlie".

Flags

FLAGS are defined as follows:
  bit 0 = 0: wire frame
  bit 0 = 1: filled-in polygons

  bit 1 = 0: only frontside visible (see above)
  bit 1 = 1: both sides visible (but maybe with different colours)

  bit 4 = 1: draw spheres without highlight (see also above)

  For triangles and polygons, the colour  is determined  by  the  sense  of
  rotation of the corner points:
     clockwise     - front side
     anticlockwise - rear side

            

Rotation

ROTATION of the object can assume the following values:

  0: it does not rotate
  1: it rotates 
(-1: it is human: it bends its head and moves its arms)
People - or, more generally speaking, objects (or should I say subjects?) - who/which throw other objects around MUST be built according to the following sequence, because this is the basis for the calculation of hand and head motions.

The first 'h=...' points are the left hand. The next 'h=...' points are the right hand.
Next are the 'k=...' points which define the head. ('h=' und 'k=' are explained in Object files.)

The first two points of the head define the axis of rotation. If the juggler bends his head forward, then these two points have to be exchanged.

Colour

The program uses 16 colours in standard mode. The colour palettes in the other modes differ more or less.

Colour 0is the background which is more or less black most of the time.
Colour 1 yellow
Colour 2 beige (skin colour)
Colour 3 dark green
Colour 4 light red
Colour 5 pink
Colour 6 light blue
Colour 7 light grey
Colour 8 visible black (black in front of a colour, otherwise grey)
Colour 9 orange
Colour 10 brown
Colour 11 light green
Colour 12 dark red
Colour 13 purple
Colour 14 dark blue
Colour 15 dark grey

Colours 0...7 cannot be changed. Colours 8 to 31 change according to the mode currently active.

You may type in negative numbers for colors. -1 denotes the 1st random color in this object. -2 is the 2nd (probably different) random color. This way you can have more than one side of an object colored with the same random color. See o/club_random.


Object comments

COMMENTS in object files may presently be inserted in three places:

a) in the first part (before the *), if the comment starts with an !,
   like in the pattern file which I am going to explain in a minute,

b) behind the 3D coordinates until the line is full,

c) behind the last line of the object, and there is no limit...

Pattern files

PATTERN FILE defines the pattern to be juggled. Its contents are thus the basics of the input. The pattern files are kept in the directory m/. When you start jongl with a pattern file which starts with a number (0 ... 9) then jongl assumes you want to see a pattern from the directory m/ (e.g. > jongl 5). If the pattern name doesn´t start with a number, jongl doesn´t change the path of the pattern file (eg. > jongl /zip/patterns/5).

First we define various optional parameters, then the mandatory positions of the people and finally the pattern.
It is IMPORTANT that spaces within one parameter are not allowed. Instead of dt = 0.234 you must write dt=0.234.
However I would like to introduce the convention that every pattern name starts with the number of objects and that it is divided into reasonable sections using underscores. The name of the pattern should not be chosen too long.
Pattern files can thus be compiled from the following components:

    Variable parameters with defaults 
                  Optional parameters 
                     Pattern comments 
            Positions of the jugglers 
                   Pattern definition 
                             Bouncing 
           Kind of throw, spin, angle 

Variable parameters with defaults

With these parameters you can influence the happenings. But it is not 
necessary to adjust them as they have already reasonable initial values.

a=6     Type of objects to be thrown around. (Numbering see the file
        'list_of_objects'.)

B=1.0,1.0,3.5,185.0   With this parameter you can define the position of
        the observer. The values describe the viewing angle from which you
        look at the scene
        If you have interactively achieved a nice viewing angle, just
        press 'P' and the above values are entered into the pattern file.
                      
dt=.25  Time elapsed between two lines of the pattern definition. With
        this parameter you can adjust the height of the throws, while
        the program is not yet able to do it itself.

eps=.95 Reflection quality of bouncing balls, standard is 5 % loss.
        (important: eps>0) We refer here to the loss of velocity during
        reflection. Height loss goes with the square of loss of velocity,
        as the potential energy m * g * h is equal to the kinetic energy
        (m * v squared)/2. If the cinetic energy is reduced by 5 %, then
        the ball reaches only 0.95 squared = 0.9025 of its initial height.
        So if you want the ball to spring back to half its initial height,
        eps is equal to the square root of 0.5 = 0.707.

g=9.81  Gravity constant in metres per second sqared. (Equivalent to
        32.2 feet per second squared which may sound more familiar to 
        you.) Positive values relate to acceleration downward.

G=x,y,z Sets the centre around which the view rotates.
        Mostly this value is set by the program itself after the user
        pressed P (see Keyboard)

l=1.2   Longer keep-in-hand times. According to the basic design of this
        program, the juggler would never hold an object in each of his
        hands at any one time but only alternating left and right. This 
        is not so in reality. Most of the time you have all your hands 
        full and only then do you throw something away, when you have to
        catch something shortly afterwards. In order to bring a bit of 
        reality into this simulation program, the duration of the keep-
        in-hand time can be adjusted. Default values are catching 20 % 
        earlier and throwing 20 % later (which logically adds up to a 
        total of 40 %). 

q=0     Quick presentation. Normally off, if needed set q=1 (=on).
        Accelerates the graphics during the times of high life on the
        screen. (To be more precise: People become juggling coat hangers
        and all that's left of the tile floor is its edge.) If further
        acceleration is needed, the flying objects can be reduced to
        just a few points and lines.

s=.1    Scatter of the throwing and catching motions. To make the juggling
        performance look more human (that is more imperfect), the motions
        vary within a cube with a side length of '2*s' around the proper
        catching and throwing position.

Z=0.0   With this parameter you can adjust the height of the observer
        above the floor. If you enter Z=0.0, then the 'eye' will be in
        the centre of that part of space that is occupied by static,
        throwing, flying, catching objects...      Sorry, there is an 
        explanation more simple than that: This parameter defines the
        height of the centre of the sphere on which the observer moves
        around. This centre can be changed to any value while the program
        runs, by pressing 'B'.
        After reading this long paragraph you are sure happy to see
        that Z= is obsolete and was replaced by G= (see above).

The values given in these examples are the default values in the program.

Parameters no longer needed

These parameters have been used prior to V6.0. Now they are ignored.
h=4     number of hands. 

o=6     number of objects.

t=32    number of lines in the pattern.

u=5     Frames per phase. To make the motions look more easy flowing,
        every phase defined in the pattern (see below) is divided into
        several frames. Here is where you define the number of frames.
        The value depends on the processor and on the complexity of the
        scene. Too many frames will result in a slow motion movie. 

Optional parameters

These are parameters without default values, because there are no 
reasonable default values.

    Different objects in one pattern   for juggling experts
                         Hand macros   for different hand positions
           Additional static objects   for miscellaneous junk
     Controlling animation rendering   for vastly reduced rendering times

                                  up   to Pattern files


Different objects in one pattern

O=5 1#2 2#6 2#4      This parameter replaces both 'o=' and 'a='. It allows 
                     you to get a mixture of objects into the air. In the 
above example we have five objects, in fact once no. 2 (ring) (see above 
under 'jongl -n'), followed by twice no. 6 (ball) and twice no. 4 (club). 
The sequence of objects is determined by the sequence of their appearance 
in the pattern definition, as the following example shows:

-a
d-
-b
e-
-c
....
In this case the object with the letter 'a' would be a ring, 'd' and 'b' would be balls and 'e' and 'c' would be clubs. You see, the program takes the objects in the sequence as they appear in the pattern file, not by alphabet or by the value of the figures.

Hand macros

With hand macros, different hand positions can be defined for single throws.

Example:
@A p 0 .5 1     

or

@B P 0 .6 1  0 .3 1    
The letter @ is the leading letter for a macro definition of the hand position. (Just remember: @ = "at" indicates the position.)

The letter immediately behind @ is the command for calling up the macro. I recommend to use upper case letters as opposed to the lower case letters normally used for the pattern.
The following letter is either a small or a capital p. Then follows, as described further down, the definition of the hand position (no matter, whether left or right). That means we can define separately a catching position and a throwing position.

IMPORTANT: The position(s) of the juggler(s) as defined below have to be added nevertheless. Each hand macro may only be used by one hand. -> 3_Boston_Mess requires two different hand macros for the center position; one for each hand throwing there.

According to the basic program each hand always repeats the same motion, regardless where it throws what. This command provides different hand motions for different throws, e.g. Splits or Tennis or Boston Mess.

Example: '4_Spagat' which would be '4_Splits' in english

h=2 o=4 t=4 dt=.22 u=6 s=.1 
p 0
0  .6 1        %  Here we define the outer positions
0 -.6 1
*
1 A2
-  -
B3 4
-  -

With some amount of skill and patience you can even achieve lead tricks...

Additional static objects

It is possible to define additional objects which do not move:

z=2
o/basic/Bierkiste
  90
  -2 0 0
o/basic/Giraffe
  0
  2.1 0 0

Behind 'z=' we fill in how many objects we want, then comes the path for
the file to be read in (in object format as described above). Next is the
rotation around the z axis in degrees which allows us to adjust the object
as desired, and finally the x,y,z coordinates where the object is located.

Presently static objects can only be defined after the positions (p or P) 
of the people have been defined!

As mentioned earlier, the object names have not all been translated.

Controlling animation rendering

r=2 raytracing value. This describes how many pattern lines are required until all flying objects have exactly the same positions and directions as before. This is to reduce raytracing time. See example files 'm/7_2cnt_sng_trp' and 'm/8_PPS'. It also implies an automatic 's=0' to get smooth cyclic movements.

Pattern comments

Two types of COMMENTS may be included in pattern files: those which will
be shown on the screen and those which are only comments to the program.

! Anything behind an exclamation mark will be shown when the program runs.

% Comments behind a percent sign only serve for orientation in the
% program and will not appear during the performance.

Comments have to end at the end of a line, but they do not have to start 
at the beginning of a line. In the pattern definition they must be to the 
right of the definition. Example see further down.

Positions of the jugglers

There are three possibilities to define the POSITIONS of the jugglers: 'j', 'p' and 'P'.
In most cases you want to use 'j' which is much shorter but not that flexible.

Example:

j 15 1.2 -0.4 0 c r
means that the juggler is rotated by +15° around Z. He stands at (X=1.2 m; Y=-0.4 m; Z=0.0 m). The left hand throws cascade (c), the right throws reverse cascade (r). The complete list of valid keys is:

keythrow
bbackcross
ccascade
C or rreverse cascade
ffountain
Sreverse shoulder
I hope this list will grow longer. More use of these keys is at Kind of throw, spin and angle.

More details can be achieved with the p commands: The small 'p' is the simpler version in which the hands are catching and throwing at the same position. With 'P' different catching and throwing positions can be defined, which allows for instance to distinguish between cascade and backward cascade.

The next parameters after 'p' or 'P' are the rotation angle about the Z axis (in degrees) and then the 3D coordinates of the position. With a rotation angle of 0° the juggler looks straight ahead in the +X direction, +Y is to the left and +Z is upward. With 90° the juggler looks in the +Y direction.

Please note that the mean value of the Z coordinates of the hands of each juggler should be as close to 1 as possible, because that is where the program puts them. Furthermore the body will be put in the middle between
left and right hand. This will cause problems if you want, for instance, to define "Splits". In this case you define either both inner hands or both outer hands normally and the other two with '@' (see further above).

Examples:
p 0
  -1  .5 1
  -1 -.5 1
*

P 0
  -1  .5 1.2  -1  .2 .8
  -1 -.5 1.2  -1 -.2 .8
  180
   1 -.5 1.2   1 -.2 .8
   1  .5 1.2   1  .2 .8
*
As you see, the definition of the positions is concluded with an '*'.

Now we come to the Pattern definition.

Pattern definition

The pattern is defined in exactly as many columns as hands are involved. You may include as many spaces between the letters as you wish, but NO EMPTY LINES AND NO LINES WITH COMMENTS ONLY ARE ALLOWED!

A simple example is one juggler doing a cascade with three balls:

 a-  ! left hand throws object 'a'
 -2
 E-
 -a  % right hand catches 'a'
 2-
 -E
The dash '-' means that at this point in time the relevant hand is empty. The columns refer from left to right alternating to the left and right hand(s). (Important for writing passing patterns!)

You may choose almost any letter for the objects; all letters except '-', '&', '!', '%', '*', '/' and '\' are allowed. That's why the example looks so weird. However I recommend for use in patterns the sequence 1,2,3,4,5,6,7, 8,9,a,b,c,d,e,f,g... Capital letters should be saved for macros (@), to maintain a bit of transparency. Don't use anything else but numbers and lowercase letters; we may need them for any later program expansions...

You see also examples how to use comments. The program will not show comments which are to the right of the pattern definition.

Bouncing

In real life there are two types of BOUNCING: throwing the balls upward (lift bouncing) or throwing the balls downward (force bouncing). Both types are covered by this program. It is also possible to have the ball bounce more than once before catching it again.

For bouncing we have to introduce by two additional letters, '/' and '\'.

Throwing upward: '/'.

Example:
 - 1
  /2-
  - 3
  1 -
  - 2
  3 -
In this case object 2 is thrown upward for one bounce.

The notation for throwing downward (force bouncing) is: '\'. Multiple bounces are noted by multiplying the relevant letters.

Example: Bounce shower:
  1-
  -\\1
  2-
  -\\2
  3-
  -\\3
Every ball is thrown downward and bounces twice.

IMPORTANT: BOUNCING DOES NOT WORK WITH ANY ARBITRARY PARAMETERS! The program will complain if it is not possible to calculate suitable initial velocities with the inputs given.
If you want to bounce non-integer throws (like 5.5), you have to add the bounce prefix to *every* line, including the holds. See a piece of 13_1cnt_BouncePass for this:
  .
  .
  .
  /1 /8  - /b
   - /8 /5 /b
  /2 /8 /5  -
  /2  - /5 /c
  /2 /9  - /c
  .
  .
  .

Kind of throw, spin, angle

These are new to V7.0.

Let's have a look at this rather complicated looking pattern: The scissor pattern is a sync 4 club pattern in which a backcross and a "frontcross" are thrown in sync. After a left backcross follows a right backcross. The frontcross flies parallel to the jugglers body.
This pattern here has (for demonstration only) 4 different spins on the clubs, i.e. a flat, a single, a double and a triple.

! scissors with 4 clubs
dt=0.350 a=14 
j 15 0 0 0 c c
*
(b0)1       (z90*0)2
 -           -
(*1z-90)3   (b1)4
 -           -
(b2)2       (z90*2)1
 -           -
(*3z-90)4   (b3)3
 -           -
As you have noticed, the parameters are in round brackets in front of the corresponding throw. To be legal, a set of parameters must consist of 1 character and a trailing number.

characteractionnumberexamples
b,c,C,f,r,Skind of throw (see here)number of spins or * for default(b*), (f2)
zrotation of club around Z axis (points up)angle in degrees (front=0,left=90)(z-90)
*use default kind of thrownumber of spins(*0)

You see, (*3z-90) means: use default kind of throw (*) (which in this case is cascade, because of j 15 0 0 0 c c ), throw a triple (3) and point the club to the right (z-90) before the throw.

For another example, see: 11_2cnt_3_Person_Show


Multiplex and wrap around

These are deactivated since V6.0. But they will be back sometime... Here we have a more complicated example with some new commands:
'm/8_MPlex_Pass'

 *
   8 1&2   - 3
   8   -   5 3&4
 7&8   6   5 -
   -   6 5&1 2
   3 4&6   - 2
   3   -   7 2&8
 5&3   1   7 -
   -   1 4&7 6
 *
 12345678
 18475362

You may notice between one and two new features:

a) Multiplex.    With the letter '&' you can hold more than one object at a
                 time in one hand. To be more precise: as many as you want.
You may catch them at different times and throw them away together (which 
is realistic) or not (which is unrealistic). 
        
b) Wrap around.  This is shorthand writing for patterns which look as if 
                 they repeat themselves after a short time, but then they
have different object numbers. Understood? Well, take passing in four-
count (pass every second right hand one). If you write down how long it 
takes until all the objects are again where they started, then you realize 
that you have to do a lot of writing! It is much easier with wrap around: 

 *
 -1 -4
 2- 5-
 -3 -6
 4- 1-
 -2 -5
 3- 6-
 -4 -1
 5- 2-
 *
 123456
 561234
In detail:

Behind the pattern definition we have another '*'. The next line lists all the objects used in the pattern in any arbitrary sequence. The line below shows the replacements of the relevant objects. Let's look at the example: In the first line after the lower '*' the first figure is 1. The figure below that is 5. This means as soon as object number 1 drops out of the bottom of the pattern file, it comes back in at the top of the file as number 5. Object number 5 will be replaced by object number 3, and so on. This wrap-around trick saves ages of typing work. You only need to note each throw at least once and then concentrate on the wrap- around table.

See also 10_H_Mult_bounce with the notation '/4&R9' and think about it!


Listings of external files

Here comes a list of external files (which was up-to-date at some point in time way back) which is needed by JONGL:

          jongl.prefs  
       list_of_people   Choose your favorite juggler
      list_of_objects   All kinds of throwable parts

jongl.prefs

...................................................................
JonglPrefsV5

!local    = deutsch
local    = english
!local    = francais
!local    = nederlands

!winsize  = 320*240
winsize  = 400*300
!winsize  = 640*480

shadow   = 0              ! 0=no 1=shaded 2=shadows 3=flatShading 4=Lightcone
temp     = tmp/
detail   = 0              ! (<0: reduce OpenGL details; >0: more details)
hardcopy = tmp/
povout   = /home/werner/PovRay/jongl/ 8.3
siteswapsavedir = m       ! m/learning_7

! bit0: (1) delete single pics 
! bit1: (2) make loop (AMIGA only)
! bit2: (4) animGIF instead of MPEG
! bit3: (8) FLI-anim instead of MPEG
anim     = 9           

!povout   = povray/ 8.3    ! add "8.3" if you need 8.3 file names 
freq     = 25             ! replay frequency for movies
username = werner         ! UNIX only: to set permissions


fps      = off  ! switch off fps window at end of pattern (only Windows)
font     = 13             ! OpenGL: 13 or 15 pixels high

!
! AMIGA specific stuff follows:
!
!menue    = 0   !menu
!jonglReq = 0
!font     = times.font 24
!chunky   = 1   (?)
!columns  = 5   !spalten
!sound    = Monster:Audio/Sounds
!no_sound
!up       = 0   !unten
overscan  = n   !(N: no   H: horiz   V: vert   B: both)
...................................................................
'!' introduces a comment.

If the program does not find 'jongl.prefs', then the standard values listed in the above example will be used and Jongl will work nevertheless.


list_of_people

.................................................
9
RedYellowJuggler
BlueJuggler
Charlie
CharlieWithHat
Blondie
Punk
Peter
JugglerWithSkirt
MichelinMan

Skeleton   (Problems with Tesselation on Mesa)

Roboter_B
Skelett0
................................................
The first line shows the number of jugglers. The next lines contain one file name each from the directory 'o/basic'.

There is a way to manipulate the program: If you don't want to see some types of jugglers, move them to the end of the list and reduce the value in the first line such that only those people can be selected by the program who are welcome to the user.


list_of_objects

An example for a list of objects is this:
.................................................
0:  cube
1:  flag
2:  ring
3:  doublering
4:  cluster   
5:  club_red_white
6:  ball_random
7:  hat
8:  racket
9:  guitar
10: beercase
11: pancake 
12: bouncingball
13: basketball
14: club_brown
15: torch
16: club_small
17: knife
18: chainsaw
19: pottedplant
20: plate
21: axe
22: threepikes
23: club_3colours
24: club_fine
25: coffin
26: thing              (Lutscher zum Rumschmeißen)
27: club_quick
28: beermug
29: bomb
30: club_random
31: ball_yellow       )
32: ball_beige        )
33: ball_dark_green   )   colours
34: ball_light_red    )
35: ball_pink         )   1
36: ball_light_blue   )
37: ball_light_grey   )   through
38: ball_white        )
39: ball_orange       )   15
40: ball_brown        ) 
41: ball_light_green  )
42: ball_dark_red     )
43: ball_purple       )
44: ball_dark_blue    )
45: ball_dark_grey    )
46: bottle
47: ring_random
-1: EOF
.................................................
The figures indicate line numbers. The texts are the file names of the objects in the directory 'o'. Since the program assumes that the second string in each line is the file name, it is important not to use any spaces in the object names.

Known errors


The end. Please send your thoughts about this and bug reports and money orders to jongl@gmx.net.