This is the real outcome of my PyWeek failure: a neat library.
Take Chipmunk and Qt mash them up, and what do you get?
A OpenGL-accelerated, multiplatform, easy-to-use playground!
But watch the silly video that shows no interesting features instead:
You can't see it but there are 29 balloons, numbered, that bounce around happily.
Performance in the video sucks because I had to disable OpenGL in order to capture it correctly (and video recording kills my notebook,anyway). That demo normally runs in 3 seconds, not 57.
Here's the non-boilerplate code for that demo:
for x in range(1, 29):
s=cs.CPCircleShapeItem(10, b, e=.5, offset=[0, 0])
items.append(cs.CPSegmentShapeItem([0, 50], [500, 450], 1, None, e=.7))
items.append(cs.CPSegmentShapeItem([0, 450], [500, 50], 1, None, e=.7))
for i in items:
Neat, isn't it?
You can get it at the ChipScene google code project including, of course, the source.