OZONE Asylum
Forums
DHTML/Javascript
Roulette wheel physics - from a coding perspective, not as a gambler
This page's ID:
33018
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
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.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail