Rolling ball physics in 2D, how?

AI Thread Summary
The discussion revolves around creating a dynamic animation of a ball rolling on a flat surface, with user inputs for mass, friction, gravity, and initial speed. Key considerations include simulating realistic physics by calculating the distance traveled in pixels based on these parameters while running the animation at 60 frames per second. The conversation touches on the importance of accounting for angular momentum and moment of inertia, particularly if the ball is rolling rather than sliding. The moment of inertia for a sphere is defined as I = 2/5 mr², emphasizing that the distribution of mass affects this calculation. Participants suggest using energy equations to simplify the simulation, incorporating potential and kinetic energy, and recommend working in meters before converting to pixels for the animation. The discussion highlights the complexities of accurately simulating rolling motion, especially when considering factors like friction and angular energy.
C.T.
Messages
4
Reaction score
0
Im creating a little dynamic animation of a ball rolling seen from straight above. I would like the user to input the mass, friction, gravity and initial speed of the rolling ball.

I wonder how i can simulate this pretty accurate to real world.

The ball is rolling on a straight line, the x axis, and the animation is running at 60 frames per second.

I have gravity (9.81), friction, mass (kg), and initial speed (km/h).

To animate this i need the distance the ball have travelled, measured in pixel (lets say 10 pixel = 1 cm for the example), in 1/60 second (because of 60 fps) to add on ball.x (the balls position).

So, what is the formula to get distance traveled in pixels with given initial speed, mass, friction and gravity? (in case the user wants to simulate ballrolling on Pluto :-p )


Hope this made sense :)
 
Physics news on Phys.org
Describe the ramp that it's rolling down. Is it a straight incline?

cookiemonster
 
Yes there's no curve, i was thinking only 100% flat, but to add on a degree for straight incline, where the ball could roll back again could be fun :)

I thought originally that the ball had an initial speed for starting speed.
 
Now do you want to assume the ball has significant enough size that you need to consider angular energy, as well? Or would you prefer to assume that it is a point particle so you can disregard angular stuff?

The first is more accurate whereas the second is simpler, but only really an upper bound.

cookiemonster
 
hmm angular energy, on a ball? I am not quiet with you, but in the basics, its defined by one point on the x axis, so that is enough.
 
The question is do you want a rolling motion or sliding? If the ball is rolling to get a decent simulation you will need to account for the Moment of Inertia of the ball and the fact that the rolling ball has angular momentum.
 
Aha, i get it. I guess the Inertia should be in.. but i don't really understand the physics behind it. What determines the Intertia?
 
The distribution of mass.

See, we're just running around asking questions you'd never have thought about and not actually helping you. Sorry about that. =\

cookiemonster
 
Moment of inertia is determined by geometry. For a sphere

I= \frac 2 5 mr^2


You may want to find a Physic is text (Haliday and Resnick for example). This will guide you to a good solution to your problem. I recommend finding a complete solution in meters then covert to pixels only when it is time to plot on the screen.
 
  • #10
If I were you, I would work in energy. Ball starts out with some energy 'E'. This will be only potential grav energy if it starts at rest on top of the ramp. Could be both is you have an initial speed. Anyways, you can just sent up energy equations. This will make it easy to include Kinetic, Potential, Inertial, friction and so on. If you are going to make the ball spin and you haven't really worked with that subject before then you might want to leave it out. It could get a little tricky putting in spin with friction cause friction won't be sliding, it will be spinning. A few years ago in high school I spent a lot of time messing around wihjt physics in my comp sci class so i have been in the position you are in now.
 
Back
Top