Author Topic: A small problem, somebody good at physics please...  (Read 8432 times)

0 Members and 1 Guest are viewing this topic.

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
I've been trying to describe rotation of a mass around a central point to reach equilibrium.


Given a set of weights connected to a central pivot, how would you find the state of equilibrium and at at what rate would they turn to get there?

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Not sure what you mean - there's only one force in the diagram (gravity) and they all pull downwards, so it can never be in equilibrium.  What exactly are you looking to achieve?

Jim
Challenge Trophies Won:

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
The points are connected to the center pivot. There has to be a state at which the points on both sides of the pivot are not going to move any more.
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
What makes them move then, or why are they moving in the first place? What would make them come to rest to be in equilibrium?

Do you have a worked example that better explains what you mean?

Jim
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
I dont know the maths but the force of gravity acts through the center of gravity for each weight pulling each straight down. the pivot on the other hand exerts a force along the lines connecting the weights, this force acts to pull the weights towards the pivot (assuming the lines are all solid and not like ropes)
Each weight is only in a state of equilibrium if and only if the weight is directly below the pivot and there are no torque (rotations) acting on that particular weight. Only in this state does the force exerted by the pivot cancle out the force of gravity. This state is in equilibrium because the total net forces acting on that weight total to zero. Now if all the pivot points are secured then the total net force acting through all weights must add up to zero for there to be equilbrium.

Challenge Trophies Won:

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Hmm I'm sorry, I sort of lack the proper language  to describe the problem.


Let me try again. The weights are all connected in a sort of mass centralized around a pivot point. Picture a chunk of tar with small rocks stuck in it that could represent the cloud of weights. Now picture the chunk of tar with a axle driven through it at some place. Given the distribution of the weights and their distance and angle from the Axel what way would the mass rotate so that the heaviest part of the mass points toward the gravity?

This is for a game.

Cells fall from the top of the screen and attach to a growing mass in the center. This mass of stuck together cells must rotate to satisfy the pull of gravity.
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
So the pivot is fixed?
If it's 2D (the pivot can rotate around one axis only), you could just check which side (left/right) has higher weight (also dependant on the length/direction of the "arm") and simply rotate (accelerate rotation in order of weight-difference) to the other direction.
If you want more axes, also check top/bottom and/or front/back.
« Last Edit: June 22, 2008 by hellfire »
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
That will simulate it alright. to add more realism the distance between the weights and the pivots must also be considered so that the closer a weight is the more it adds to the rotation. maybe scale the weights then divide by the distance to pivot

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
the closer a weight is the more it adds to the rotation.

Surely the longer the lever is, the more force you can exert?

I mean, it's perfectly possible for a human to be able to lift up something really heavy, a car for example if the pivot is placed close to the car and the lever is long enough.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Youd think that but the longer the pivot is the more distance the force is spread through. So the effect is that a closer weight speeds up the rotation while further weights cover more distance so the rotation is slower (but the actual ammount of space travelled through is the same). like the old science experiment where you spin someone on a chair with their arms and legs outstretched then ask them to pull their arms and legs in close to them while they spin. This causes the rotation to accellerate

Edit - the further weights must travel more distance to cover the same angle of rotation. since the force acting on the weights is a constant (gravity) the momentum is also the same (the differences caused by the mass of the weights is so miniscule that it can be ignored). But when the momentum is converted into angular momentum the closer weights rotate faster.
« Last Edit: June 22, 2008 by rain_storm »

Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
As far as I can tell, you need to calculate the centre of gravity of all the weights combined, having the whole thing rotated so the centre of gravity is directly below the pivot would mean it was in equilibrium i think. how the forces work to get it there I have no idea though.

Offline stormbringer

  • Time moves by fast, no second chance
  • Amiga 1200
  • ****
  • Posts: 453
  • Karma: 73
    • View Profile
    • www.retro-remakes.net
the closer a weight is the more it adds to the rotation.

Surely the longer the lever is, the more force you can exert?

I mean, it's perfectly possible for a human to be able to lift up something really heavy, a car for example if the pivot is placed close to the car and the lever is long enough.

with the condition that the lever is made of a material that does not bend or break :D
We once had a passion
It all seemed so right
So young and so eager
No end in sight
But now we are prisoners
In our own hearts
Nothing seems real
It's all torn apart

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Thanks for all of the help guys.

If I treat each weight as a vector from the center point and add all vectors up they seem to form a new vector which should be the angle at which the center of gravity lies from the pivot point. I think I'll have a tinker and then go from there. Is there a relation ship between how long the product of all vectors is and the rate at which the mass of vectors reaches equilibrium?
« Last Edit: June 22, 2008 by Pixel_Outlaw »
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
if you have 2 masses, you find the centre of gravity between them with

d=dt*(m2/(m1+m2))

where d is the distance from the centre of mass 1 along the line between the 2 masses, dt is the distance between them, m1 and m2 are the masses.
once you find that centre, it can be considered a single mass at that point with the sum of the 2 masses and the same calculation can be used again to combine more masses to the system.

EDIT:
For how it reaches equilibrium, maybe look up pendulum physics.
« Last Edit: June 23, 2008 by Stonemonkey »

Offline Motorherp

  • C= 64
  • **
  • Posts: 57
  • Karma: 8
    • View Profile
    • Shmup Dev
How do, lucky for you physics is right up my street  ;D

The good thing is that the system you describe can be simplified greatly if the positions of the weights relative to each other dont change since you can then treat the entire system as one rigid body.  To find the mass properties you could use something along these lines:

Code: [Select]
struct pointWeight
{
   float m_mass;
   vec m_pos;
};


float totalMass = 0.0f;
vec centerOfMass = zeroVec;

for(int i = 0; i < numPointWeights; ++i)
{
   totalMass = weights[i].m_mass;
   centerOfMass += weights[i].m_mass * weights[i].m_pos;
}

centerOfMass  /= totalMass;

You can then apply gravitational forces at this center of mass to calculate the rotation of the rigid body.  How you do this exactly depends on whether your system is 2d or 3d (your picure doesn't make that clear).  I recommend reading up on rigidbody motion integration and inertia tensors, there's plenty of tutorials out there which will explain this.  This of course is only important if you actualy want to simulate the motion of the system.  Instead you talk about finding the time to reach equilibrium but I think you're misunderstandin some physical concepts here.

Thing is, unless your system starts out in equilibrium it will never actualy reach equilibrium given just the system you've stated.  For that to happen you'd need to take into consideration energy loss of the system.  The rate at which you reached equilibrium would then be a function of the efficiency of the system.  Also given a perfect system, the length of the center of mass vector or indeed the mass magnitude itself will have no effect on the period of the oscillations and hence no effect on the rate at which equilibrium is reached, this is simply a function of system energy efficiency.  In the real world this independance on the mass properties might not hold true however due to imperfections in the system and also the mass effect on terminal velocity should air drag be taken into account.  You shouldn't have to worry about these things though, you can describe the system pretty well with just some motion damping values to represent energy loss without worrying about how exactly that energy is lost.

I'm not sure exactly what it is you're trying to acheive so I cant give you any more advice than that for now.  Perhaps if you were to say what exactly you'd like to see on the screen when you run your game and how you'd like these things to interact I might be able to help further.  I imagine though that what you're probably after is to simulate the system but you're just going about it the wrong way.  Read up on rigidbody physics and hopefully that will give you a much better idea of what to do.


Edit:  Sorry my bad, the length of the com vector does actualy effect period, but not the mass magnitude.  The reason being that acceleration under gravity is the same for any mass, but a large dispacement of the mass center means it has further to travel.  It still wont effect the rate of equilibrium though.
« Last Edit: June 23, 2008 by Motorherp »

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
I was waiting for you to chime in.  :goodpost:
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Hey P.O. how are you getting along with this? Its something I had an interest in too a while back when I was working on pool ball physics. One thing that I found is that trying to do something like this accurately is impossible the best you can hope for is to simulate it closely, but doing it simple can be buggy. If you need us just holler

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Tetra posted some nice source about rigid body physics too but I can't find it for the life of me... It's on this forum somewhere!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
@Shocky:

Do you mean this thread :

http://dbfinteractive.com/index.php?topic=1501.0

?
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Challenge Trophies Won: