AddThis

Bookmark and Share

Friday, 18 March 2011

Virtual Pool in a Box

Introduction to Virtual Pool in a Box

The virtual pool trainer interfaces with the user through a real cue stick. The cuestick is attached to a linear potentiometer, which in turn is attached to a rotary potentiometer. The rotary potentiometer, simulating the position of the white cueball on the table, detects the direction of alignment of the cuestick, and hence determines the direction of initial thrust of the cueball. The linear potentiometer determines the position of the cuestick relative to the cueball, so that it can be known when the cuestick strikes the cueball. An accelerometer, attached to the cuestick as well, and measuring up to 10G measures the acceleration of the cuestick on impact with the cueball. The whole setup involving the cuestick, potentiometers and the simulated pool table is shown in the picture below.

The imagery of the cuestick as it rotates and adjusts is captured on the LCD screen in real time. In addition, the LCD displays the pool table and balls according to real life proportions. At the start of the game, the player is able to follow instructions on screen by pressing several buttons attached to the box containing the LCD. Using these buttons, he is also able to position the cueball at any position on the table upon the cueball entering the pockets. Seamless integration of the user inputs and output on the LCD screen is controlled by the ATMega 32 MCU.

On startup, the player can choose 1 of 2 modes: Training and Full Game. Training allows the user to choose from 1 up to 5 object balls for the purpose of practicing. Full game pits 2 players against each other, in an 8-ball pool game, with a total of 15 object balls on the table, numbered 1 to 15. Complicated background mathematical computations allow the balls to move as they should in real life, including the effects of friction with the table top, wall collision and ball collision. In the 8-ball pool game, several rules are followed, such as allowing the opponent to place the cueball freely upon “scratch” by one of the players. When 1 player has pocketed 7 of his balls as well as the number 8 black ball, the game ends.

0 comments:

Post a Comment

There was an error in this gadget