I crosspost from http://www.javagaming.org/index.php/topic,18035.msg169416.html#msg169416
, hoping may be here Bullet community can help me.
I make small demo, with box, bordered by 4 static planes, and several (7-10 is enough) bolls moving in it (billiard, you know). No friction, no gravity, DiscreteDynamicWorld, AxisSweep3 broadphase, SequentialImpulseConstraintSolver, and so on -- mostly copied from your demos. And it shows quite strange behavior.
1. Energy ( =sum(m*v^2/2) ) does not conserve. Even not close to it. Every collision change total energy of system. For my expirements it's constantly increase, so, after 5000 iterations or above energy increases about 30 times! Even if I decrease simulation step to 0.0001 and use rather small initial velocities (about 5-7m/s). I've noticed, what 1 ball, even with step 0.01 is rather stable in it, so errors seems to rooted in sphere-sphere collisions.
2. Although sphere-sphere and sphere-plane collisions are perfectly symmetric (forces are applied to mass center), and they was not given initial rotation (angular velocity), after collisions angular velocity tends to grow up. It means, angular momentum is also not conserve. I do not know, may be it's known limitation of used algorithms, but it also may indicate some errors in it. Again, 1 ball is rather stable in it, so it seems to be a feature of sphere-sphere collisions.
My general question is -- does original Bullet engine tryes to keep energy/momentum and the like invariants? If generally not, what efforts may be done with current (j)bullet to get results closest physically correct one -- I mean, which solver/collision detector/etc to use, which params to tune (may be paying by perfomance) ?
To be clear -- I search engine for realtime physical models (educational area) in java. I was sure I need to develop it by myself, but meeting with jbullet I've decided to try and use it instead. My be I was completly wrong?