FRENCH BILLIARDS SIMULATION
Carlos Perromat
CSC 471 - Spring 2006
Dr. Zoe Wood
Introduction
French billiard is a game of the same family as pool, snooker and others. The main and obvious difference with all others is that, in this version of the game, the table has no pockets, there are only three balls. The objective is to make the cue ball contact the two others in combination. The game can be further complicated adding the condition of a three bumper rule. Although any proficient player of Pool can master French Billiards, the focus of the game shifts from the trajectory of the target ball in pool to the cue ball in the French version. Even the most basic plays often require the correct combination of english (horizontal rotation), roll back and back spin.
Features
The game simulates normal ball movement, including strength adjustment and aiming. Balls have inelastic collisions both with bumpers and balls, and are subject to continuous friction. The basic shot can be modified by the selection of the spot in which the cue ball will be impacted.
Brief Discussion of Billiard Physics
Billiards are the most classic example of elastic collisions. Open your old Physics book and you'll see. They are usually presented in problems in which two balls approach each other and after the collision have modified their trajectory. Using this elastic approximation, this collision can be described using the principles of conservation of energy and momentum. In other terms:
m1 v1i + m2 v2i= m1 v1f + m2 v2f (Conservation of momentum).
1/2 m1 v1i2 + 1/2 m2 v2i2 = 1/2 m1 v1f2 + 1/2 m2 v2f2 (Conservation of energy).
Make both masses equal (which is an acceptable approximation), one of the balls at rest, and you have a very nice freshman year trigonometry problem. In Pool, were almost all shots are done at the center, can be modeled with those two formulas. You would only need to add for friction (or you would have eternal movement), and at the very least, bumper energy absorption, that is, a ball loses energy every time it collides. This also applies to crashes against other balls, but the absorption in this case is very small, distributed among the balls, and probably hardly noticeable.
Of course, friction is a very delicate subject, since it both works against the movement, but also causes rotation. To complicate things even more, friction varies depending on tangential and rotational slip, which ends being a very difficult thing to calculate continuously. The usual approach is to include a linear value for friction, with trivial implementation (I took this approach, after considering the alternative). A scientific simulation, however, should do better.
For our simulation, two more factors are to be accounted, since they are needed in almost every play. Roll forward or backwards have different effects whether they involve hitting a ball, a bumper, or just affecting movement. You apply those by hitting the ball above or below the middle. If you just hit upwards, your ball will travel more, since it will start rotating earlier. On a regular ball, the rotation does not significantly appear until some time after the beginning of movement. During that time the friction effect on the trajectory is the largest. Hitting the ball below, will make this interval longer. If a ball is hit while this effects are in place two opposite effects occur, if rolling forward the cue ball will follow the target, to a certain extent. Rolling backwards enhances the collision effect. These effects apply to the collision with a bumper, but the larger friction caused by the prolonged contact against the deformable surface of the bumper, minimize the effect.
Finally english. Almost no shot in French billiards is without, but a pro Pool player would disapprove if he saw you do it. For one thing is harder to aim when you hit a ball off the side, although good players can get around it. What they cannot avoid is that the trajectory of the ball is deflected as the ball moves, and it does so in quite unpredictable ways, because of the vibrations included by the awkward shot. However, a ball with english will change its trajectory enormously after bouncing of a bumper. Since any play in French billiards involves at least two collisions, the possibility of forcing a trajectory that would otherwise be impossible.
Implementation Notes
The simulation was made with OpenGL and the GLUT library. All the elements in the scene were created with primitives. The timer function in GLUT was used to create the entire animation, which was regrettable since it provides varying performance all around, and makes your life hard. Friction as mentioned before was simplified to a linear component. Roll back and roll forward were simulated by calculating their values at creation of the movement. They were only applied to the cue ball, since, although, they do occur after contact between balls, the contact area is too small and the time of contact to brief to create a significant effect. For all purposes, the simulation treated the balls as cylinders, since it did not produce any real rotation. After all, the real rotation of a model in OpenGL on an object represented by a homogeneous, completely regular surface is undetectable, and seems rather pointless, although it would have been nice to know it was there. There were problems associated with the timers used. Since the timer is triggered at irregular intervals, at times, an entire collision could be missed, an the angle of incidence compromised. A lot of overhead just goes into trying to find the time at which a detected collision occurred.
Controls
The entire thing is controlled with the awsd keys, with z for action. This interface is used for different things in the game. When aiming, the keys control the camera around the ball, pointing the trajectory the ball will follow. After hitting the z key, the keys are used to chose the strike point on the cue ball. Hit z again when the meter bar is at the desired level to perform the strike. Finally, at play mode, the keys can be used to move the camera around the table.
Screenshots
Initial
setup
Aiming