publications
Markus Püschel
Professor
Electrical and Computer Engineering
Carnegie Mellon University
pueschel@ece.cmu.edu
+1 412 268 3804

home

publications

teaching

short CV

personal

the pub

3-Cushion Billard Animations

A Java/Mathematica program to animate 3-cushion billard dessins.
By S. Egner and M. Püschel, 1996.

The design...

Markus Püschel is the 3-cushion billard champion of the state of Baden-Württemberg in 1995 and member of the team of Erlangen, Germany's 3-cushion billard Bundesliga winner of 1996. Out of enthusiasm for his sport M. Püschel suggested to me to write a program to animate 3-cushion billard dessins. Finally, we came up with a combination of a compiler written in Mathematica and a run-time system written in Java. This combination of programs allows to enter billard dessins in a textual form in some formal language and to view the result as an animation. For example, the following piece of text is the source code of "dessin #1".


ba1 =
  BillardAnimation[
    name        -> "Ansto\"s",
    author      -> "MP, SE, 17.9.96",

    starts[White,  {2.5, 2.0}, speed -> fast],
    starts[Yellow, {2.0, 2.0}],
    starts[Red,    {2.0, 6.0}],
    meets[White, Red, treff -> left[2/3]],
    touches[Red, North[2.8]],
    touches[White, West[7.5]],
    touches[White, North[0.5]],
    touches[Red, East[2.5]],
    touches[White, East[4.8]],
    touches[Red, South[3.5]],
    meets[White, Yellow, treff -> left[1/2]],
    touches[White, South[2.0]],
    touches[Yellow, West[1.5]],
    stops[Yellow, {0.5, 1.4}],    
    stops[White, {1.5, 1.5}],
    stops[Red, {1.0, 5.5}]
  ];
This source code is compiled into a call of the Java applet class BillardAnimation. The timing of the events was not entirely satisfactory and has then be fine tuned by Markus. This has resulted in the following piece of HTML. The numbers represent events (t,x,y) on the trajectory.

<APPLET CODE="BillardAnimation.class" WIDTH = 300 HEIGHT = 500>
<param name=timeUnit value=1.1>
<param name=White value= 
" 0.0 2.5     2.0
  0.3 1.95335 5.76458
  0.8 0.12    7.5 
  0.9 0.5     7.88
  2.3 3.88    4.8
  3.8 2.21159 2.11327
  5.8 2.0     0.12
  9.8 1.5     1.5 ">
<param name=Yellow value=
"  3.8 2.0  2.0 
   6.8 0.12 1.5 
   8.8 0.5  1.4 ">
<param name=Red value= 
" 0.3 2.0  6.0
  0.6 2.8  7.88
  2.4 3.88 2.5 
  3.9 3.5  0.12
 10.2 1.0  5.5 ">
[BillardAnimation applet]
</APPLET>
The purpose of the BillardAnimation applet is to provide an Internet way of presenting the short animations which billard players call "dessins". The dessin has to be entered manually, the compiler just makes life easier. We have not attempted to compute a physical simulation of the motion of the billard balls. And we do not know of any physical billard simulator which produces results satisfying professional billard players. Recall, the billard balls slide, roll, spin and fly. Their interaction with the queue, the cushion and with each other are highly complex processes depending on surface status, age of the cloth, temperature and any kind of imperfections. For this reason a physical simulation of 3-cushion billard is a formidable task, which has never been solved so far!

What we have aimed at with the programs is a relatively easy way of entering a dessin and showing it in real time. However, entering a dessin is work. Maybe some day we build an automatic pick-up device for a dessin played by a human player at a real table.

...the Programs

The compiler which takes textual source code into a call to the BillardAnimation applet is a Mathematica v2.0 program of 1.8k lines of code. Its running time is a few seconds.

The applet class BillardAnimation is a Java program of 0.9k lines of code. It takes the trajectories of the balls from its environment, decodes and shows the motion of the three balls as smooth as possible.

by Sebastian Egner, 1997