- #1
C.T.
- 4
- 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 )
Hope this made sense :)
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 )
Hope this made sense :)