Topic: Roulette wheel physics - from a coding perspective, not as a gambler (Page 1 of 1) Pages that link to <a href="" title="Pages that link to Topic: Roulette wheel physics - from a coding perspective, not as a gambler (Page 1 of 1)" rel="nofollow" >Topic: Roulette wheel physics - from a coding perspective, not as a gambler <span class="small">(Page 1 of 1)</span>\

Bipolar (III) Inmate

From: London
Insane since: Jul 2004

IP logged posted posted 02-14-2015 15:25 Edit Quote

I thought I'd have a go at writing a vaguely realistic roulette wheel demo, and have been looking around for information on how the ball & wheel behave and interact from a physics point of view.

Unfortunately, all I've managed to find are documents aimed at gamblers wanting a better chance of winning, plus a few very basic code examples that don't really do much other than spin without any real-world physics involved.

Does anyone know where I might find this information, or even better, the same information aimed at a developer?



Paranoid (IV) Inmate

From: cell 3736
Insane since: Jul 2003

IP logged posted posted 02-15-2015 15:09 Edit Quote

Probably best to play around with an existing physics engine.
First the ball should roll around the rim of the wheel freely until it loses enough momentum to start interacting with the spinning inner wheel and the separators between the numbers.
Then the separators should make the ball bounce around a bit before it loses enough speed again to settle into one of the number slots.

So first there's an impulse that starts the ball moving.
Then there's centrifugal force holding the ball against the rim.
In the meantime there's friction slowing the ball down.
Then when the ball touches one of the separators there's another impulse.
In the meantime there's friction again dictating the spin of the ball which can be crucial for determining which way the ball is going to bounce.

I guess you could introduce some randomness by changing some of the initial parameters such as: initial impulse on the ball, initial spin of the ball and speed of the inner wheel.

Post Reply
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
Your Text:
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu