Advertisement

mass, forces and angular acceleration

Started by May 02, 2003 07:11 PM
20 comments, last by Fusi0n 21 years, 9 months ago
quote:
Original post by Xai
1. You can fairly well ignore the thoughts about "what if the body cannot rotate, then it just does strait translation" ... this is 100% true, but the ONLY reason a body cannot rotate is if it is either PART of a larger ridgid body, or is impacting another body ... so for you basic minimal simulation of independent reactions of bodies to forces, this will not matter at all ... all of your bodies (masses) are assumed to be able to freely translate and rotate, as if alone in space (right?).



If you were to an object with a finite mass, but with the mass distributed at an infinite distance from the center of mass, then you would have an object that could translate but not rotate.

I only mentioned it because it is easy to do in a simulation.

The angular and liner acceleration are seperate. Xai is explaining it quite well.
ok, after searching this forum for related posts i came across this:

http://www.gamedev.net/community/forums/topic.asp?topic_id=51845

which highlights a problem that my current thinking would not resolve :s this forces me to rethink how i apply multiple forces to an object. instead of taking each force, calculating the components of this force into the force in the direction of the vector to the center of mass from the application point and the force perpendicular to that force, i would have to first sum up all the forces as well as their application points, resulting in an overall force at an overall location relative to the center of mass.

so, using the diagram presented in the link above:

                 p----->f                 |                 |                 |                 |                 o cm                 |                 |                 |                 |                 q----->g 


where o is the center of mass, p is the application point of force f, and q is the application point of force g. we need to find not only the overall force on the object, but also the overall application point, so we sum the force, and average the application points to get:

                 p                 |                 |                 |                 |                 cm o----------->fg                 |                 |                 |                 |                 q 


where o is now the center of mass _and_ the application point, which is found by averaging the application points. the overall force however is just summed resulting in an overall force, gf.

after we have summed all the forces acting an the object and found the overall application point by averaging all the application points of the various forces we then convert this resulting force into components along the vector from the overall application point to the center of mass and the vector thats perpendicular to this vector.

actually thinking about what ive just said i dont think its right, what if in the above diagram the force f is negated so its pointing in the opposite direction?

          f<-----p                 |                 |                 |                 |                 o cm                 |                 |                 |                 |                 q----->g 

in this case, using what i said above, the forces would cancel out and the overall application point would be the center of mass which is clearly wrong.

gah im really really confused now. really need someone to clarify all this for me

"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Aristotle
http://fusi.basscut.net"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Aristotle
Advertisement
I''m not going to comment on your last post until I get a chance to read some of my physics book an think a while (I would hate to lead you astray now - and I personally have never even implemented quaternions ...)

The one thing I can add, is some more info as to why I say you cannot rotate and object without causing translation ... the reason is because it is impossible for there to ever be a force which acts on a body with a vector which is 100% perpendicular ... 100% perpendicular to an outer point would be just barely NOT touching the object ... if there is friction between these objects, then the force vector will be slightly less than perpendicular ... although I will say, for your purposes, you can treat 100% perpendicular either way you want (pure rotation, or no force transfer) and it will be fine ... since there is really no way to compute simulations with enough accuracy for it to ever matter ... and the pure rotation idea may allow you to create situations which would otherwise be too complicated ...)
You can rotate if you have two forces, though. Think of two rocket engines at each end of a stick, pointing in opposite directions.

The angular MOMENTUM is conserved, in WORLD SPACE. Meanwhile, the angular inertia is expressed as a constant inertia tensor in OBJECT SPACE. This makes for all kinds of fun!

Contrary to linear movement, where you can calculate velocity or momentum, and they''ll always be parallel / in sync, this is NOT TRUE for rotation. You have to conserve the angular momentum, and you have to integrate to get velocity.

If your object is symmetrical around three axes, your inertia tensor is diagonal, and you could represent it as a simple three-vector, but don''t let that fool you.

A good book is "Classical Mechanics" and a good name for papers is "Baraff".

If your tensor calculus is a bit rusty, you might want to look at the ODE (Open Dynamics Engine) which comes with source for free, and does all of this. It also does a bunch of collision/penetration cases, and constrained joints, for you. Unfortunately, it doesn''t do arbitrary meshes; you''ll have to add that on your own (or drop in some code available on the net).
quote:
Original post by Fusi0n
... i would have to first sum up all the forces as well as their application points, resulting in an overall force at an overall location relative to the center of mass.


                 p----->f                 |                 |                 o cm                 |                 |                 q--->g  


Object is the object, force is the force vector, and offset is the location relative to the CM.

object->force += force;
object->angle_force += magnitude(force) * magnitude(offset) * dot_product(force, offset);

For 2d it is that simple.

And, to make things even better, you can just cancel out the magnitude(force), and magnitude(offset) with the division part of the dot product, so

magnitude(force) * magnitude(offset) * dot_product(force, offset)
=
magnitude(force) * magnitude(offset) * ((force.x*offset.x+force.y*offset.y)/magnitude(force) * magnitude(offset))

so, the whole thing you do for each force is:
object->force += force;
object->angle_force += (force.x*offset.x + force.y*offset.y);

2d is nice and simple, so all you do after accumulating the linear and angular force components is:

object->accel = object->force / object->mass;
object->angle_accel = object->angle_force / object->moment_of_inertia;

thanks for the response everyone, but im still really confused :/

earlier i proposed that we can seperate the contact force into its component parts along the vector from the contact point to the center of mass and along the vector perpendicular to that, to seperate the force into its linear and angular parts that result in linear and angular acceleration. this would work fine if there is only ever one force being applied to the object at any one time.

however, when we take into account more than one force acting on the object, the previous solution breaks down and no longer works, especially when we deal with forces that result in some sort of angular acceleration.

this proposition of working with the angular momentum is interesting, althought i dont know enough about it and how it applies right now. i assume angular momentum is roughly the same as linear momentum, p=mv, but where v is now the angular velocity. how would we work this out for more than one force? i think what the real problem here is how we add up all the forces acting on an object at any one time and how to get an overall angular and linear acceleration from them.

going back to the latest post by Anonymous Poster, you say i should just add the overall force to the linear force acting on the object, how can this be correct? if the force is being applied at a contact force thats not in line with the center of mass it would surely create some angular acceleration as well, in which case just adding the force to the linear force acting on the body would result in more resulting energy in the system that was put in in the first place!

as Xai says, you can never ave a force acting on a body that only results in angular acceleration, and thinking about it, Xia is correct. but still, using the ideas i had about one force acting on a body this would still not work, ive clearly srewed up somewhere.

going back to the first diagram in my latest post, if we have two forces that act in the same direction on different sides of an object that result only in angular acceleration, how would we convert the result of these forces into linear acceleration, as they cancel each other out when it comes to angular acceleration, but should result in linear acceleration. how would we find the force resulting from these two forces that does this?

i dont think starting coding at this point would yeild any useful results, the way this whole thing works still needs to be understood, this is clearly a really complicated puzzle that at first looked simpler than what it really is. as always, any feedback is most welcome thanks


"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Aristotle
http://fusi.basscut.net"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Aristotle
Advertisement
I resign.

Just read all the papers listed on this page:
http://www-2.cs.cmu.edu/afs/cs/user/baraff/www/pbm/pbm.html

Then read all the ones listed here:
http://www.d6.com/users/checker/dynamics.htm

That''s how I learned it.
Actually, read this first. It answers your question about how the force that causes linear and angular acceleration does more work. Since work=force*distance, the force is applied over a larger distance because the point on the object turns.

http://www-2.cs.cmu.edu/afs/cs/user/baraff/www/pbm/rigid1.pdf
on page 28, at "5.5 Force vs. Torque Puzzle"
i guess ive just got to go away read those things over and over until i understand every word and equation ;/

thanks for all your help everyone, ill post my findings to this thread when/if i ever figure this out

"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Aristotle
http://fusi.basscut.net"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Aristotle
mm ok i think im getting it, slowly what we do is we take the whole force and just apply it to the center of mass.. Baraff says:

"Now suppose that the same force F is applied off-center to the body as shown in figure 11. Since the force acting on the body is the same, the acceleration of the center of mass is the same."

im taking this to mean we just apply the force to the center of mass like a previous anonymous poster told me todo

we then, independantly of what we have just done, find out how much of the force makes the object spin and then apply that.

in effect summing up all the linear forces and applying them to the center of mass, and summing up all the resulting torques and applying that.

it all makes a creppy kind of sense now, but im still stuck on a few things, not the implementation, but a few real world scenarios where i cant quite see how this works....

take a hardback book, and wrap an elastic band around it so it doesnt fall open. hold it on a table so that only the spine is in contact with the table surface. as dipicted below:

                 /                /                 /                  /     /             /     /     book > /     /           /     /          /     /         /     /        /     /       /     /      /     /     /     /     \    /      \  /_______\/___________________       ^           ^     spine       table  


now let go of the book. depending on how rough the surface is, the book will either just fall flat, without the spine moving on the table top, or the book will move slightly to the side (to the right in this case) when it hits.

my guess as to whats happening here is that the table is not exerting a force on the center of the book, but at the place where the book comes in contact with the table, at its spine. as the only force really acting on the book is gravity [EDIT: and the normal force from the table top], and Baraff tells us that this force acts on the center of mass, how come the book moves to the side a bit when its front/back cover hits the table?

"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Aristotle

[edited by - fusi0n on May 4, 2003 8:56:40 PM]
http://fusi.basscut.net"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Aristotle

This topic is closed to new replies.

Advertisement