# slot machine physics

This topic is 4815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Does anyone have any ideas for programming the physics of the reels spinning on a 3d slot machine? Basically, I need a function that produces an angle of rotation given the current time. Eventually, the angle of rotation needs to end up at a multiple of 45 degrees (because I have 8 items on each reel and I want them to be aligned right when the spin is thru). mike http://www.coolgroups.com/

##### Share on other sites
Quote:
 Original post by mike74Does anyone have any ideas for programming the physics of the reels spinning on a 3d slot machine? Basically, I need a function that produces an angle of rotation given the current time. Eventually, the angle of rotation needs to end up at a multiple of 45 degrees (because I have 8 items on each reel and I want them to be aligned right when the spin is thru).mikehttp://www.coolgroups.com/

This is a simple application of a well-known kinematics formula. Use

θ(t) = ω · t

where ω is the angular velocity of the reel. To get this in increments of 45 degrees, use θ*(t) = θ(t)/2π - floor[θ(t)/2π] * θ(t)/2π. Then multiply the result by 2π/8 to get a number in the range [0, 7]. Multiply the integral value by 45 degrees to get the final position.

##### Share on other sites
If there are eight faces then there are 16 stop positions. I believe with a modern slot machine the electronics determines the outcome and motors produce it. The only nearly random part is the electronics selecting an outcome. The spinning of the reels is just a show to entertain the player.

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633295
• Total Posts
3011245
• ### Who's Online (See full list)

There are no registered users currently online

×