I have two questions.
- How to convert pymunk rotation into real-world radians/sec.
- How to determine the x and y velocities of the falling masses in terms of pixels moved/sec
Does it have anything to do with space.step() or frames per second?
I have two questions.
Does it have anything to do with space.step() or frames per second?
There is a short explanation of the units Pymunk use in the docs: http://www.pymunk.org/en/latest/overview.html#mass-weight-and-units
Normally Pymunk does not know about or care what units you use, its up to you when you model your simulation to use units that make sense. The values you read out from Pymunk will the use the units (or derived units) of whatever the values you put in have.
For example:
In your code you do space.step(0.01), Pymunk does not know if this means 0.01 seconds or 0.01 hours or something else. The same is true when it comes to positions. You do body.position = 400,400, but Pymunk does not know if the position given is in pixels, meters or something else. That means that if you decide that the unit of time you use with Pymunk is seconds, and the unit of distance is pixels, then the velocity that you can get with body.velocity will be pixels/seconds ([unit of distance]/[unit of time]).
Given the above body.angular_velocity would be 1 rad/second, and body.velocity would be returned in pixels/second. Note however that what you see on the screen wont match perfectly, since you put 0.01 as dt to space.step(dt), but your drawing loop doesnt necessarily run 100 times per second (its common to use the Pygame Clock.tick(..) method to restrict the loop)