# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Bullet Physics EquationsPosted: Fri Oct 06, 2017 8:47 am

Joined: Fri Oct 06, 2017 8:42 am
Posts: 2
Hello,

Where can I find the physics equations implemented by the Bullet Physics Engine? Specifically, I am looking for the equations that govern the collisions in a pybullet simulation. If two objects are created in collision (sharing some or all the same mesh points), they push each other out.

1) What are the equations that govern the forces that push the objects out of each other?

2) Is there a way to control the forces such that they don't act in the z direction at all? That way they would push each other out, but only in the x and y directions.

Any help is very much appreciated!

Top

 Post subject: Re: Bullet Physics EquationsPosted: Mon Oct 09, 2017 3:31 pm

Joined: Tue Sep 30, 2014 6:03 pm
Posts: 346
Location: San Francisco
What do you really want to do? Are you trying to use Bullet in 2D mode?

You can limit a btRigidBody to move in its XY plane and only rotate about Z like so:
Code:
body->setLinearFactor(btVector3(1,0,1));
body->setAngularFactor(btVector3(0,1,0));

Top

 Post subject: Re: Bullet Physics EquationsPosted: Mon Oct 09, 2017 6:07 pm

Joined: Fri Oct 06, 2017 8:42 am
Posts: 2
Thank you very much!

I'm trying to do just that but in Python, do you know if that is possible?

Also, I'm trying to find the governing equations. When two objects are created in collision, and they push each other out, how is the resulting force calculated? Is it modeled as an (most probably) elastic or non-elastic collision?

From highschool, I remember (m1*v1) + (m2*v2) = (m1*v1') + (m2*v2'), and that is related to the force. But when two objects are simply created in a simulation, what is their initial velocity assumed as?

Top

 Post subject: Re: Bullet Physics EquationsPosted: Mon Oct 09, 2017 8:14 pm

Joined: Tue Sep 30, 2014 6:03 pm
Posts: 346
Location: San Francisco
For normal collisions I believe the ContactPoint is processed like a "constraint", which means the forces of the event are implicit in the solution. In short: a Jacobian matrix is computed and the problem comes down to the solving the Ax = b matrix equation, where x is a vector of unknown values for which we're trying to solve: positions and velocities <x, y, z, Vx, Vy, Vz, qx, qz, qy, qw, ωx, ωy, ωz>. The A matrix must be inverted and then x can be computed: A'b = x The method doesn't bother to compute the intermediary forces.

When two objects significantly overlap I don't know what happens. Bullet has some "inter-penetration resolution" code that will push penetrating objects apart without pumping too much energy into the system but I don't know how it works.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 13 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities