Shannon's Juggling Law: (F+D)H=(V+D)N
# Physical constants
H = 2.0 # 2 Hands
N = 3.0 # 3 balls
# Flight time comes from physics
# y = 1/2at^2
# but we want t, so t = sqrt(2*y/a)
G = 9.8 # gravity in m/s**2
G *= 100 # in cm/s**2
F = lambda h: 2*(2*h/G)**.5
# Flight time for 25cm (~= 1ft)
height = 25
F_1ft = F(height)
"%.4fs flight time at height %d cm" % (F_1ft, height)
'0.4518s flight time at height 25 cm'
As a simplyfying assumption, set V = D. This allows us to solve for D by turning the above equation into
(F+D)H = (V+D)N
(F+D)H = 2DN
FH + DH = 2DN
2DN - DH = FH
D(2N - H) = FH
D = FH/(2N-H)
D = lambda f: f*H/(2*N-H)
Since D == V, D + V = 1 full hand-cycle, in seconds
Hand_cycle_time = 2 * D(F(25))
Hand_Hz = 1/Hand_cycle_time
Hand_rpm = 60 * Hand_Hz
'Hand cycles in %.4fs, or at %.4fHz (%.1f rpm)' % (Hand_cycle_time, Hand_Hz, Hand_rpm)
'Hand cycles in 0.4518s, or at 2.2136Hz (132.8 rpm)'
So, to sum up:
def hand_rpm(balls, height_in_cm=25):
H = 2.0
F = 2*(2*height_in_cm/980.0)**.5
D = F * H / ( 2 * balls - H )
cycle_time = 2 * D
hz = 1 / cycle_time
rpm = 60 * hz
return '%d balls cycle in %.4fs, or at %.4fHz (%.1f rpm)' % (balls, cycle_time, hz, rpm)
for hands in (3, 5, 7, 9):
print hand_rpm(hands)
3 balls cycle in 0.4518s, or at 2.2136Hz (132.8 rpm) 5 balls cycle in 0.2259s, or at 4.4272Hz (265.6 rpm) 7 balls cycle in 0.1506s, or at 6.6408Hz (398.4 rpm) 9 balls cycle in 0.1129s, or at 8.8544Hz (531.3 rpm)