# Force Question

This topic is 4969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a problem figuring out how to apply forces for this situation. I have a moving object called Ship 1 that travels at say 100 m/s. Ship 1 is NOT accelerating. Ship 1 is connected by a rope to another ship called Ship 2. Ship 2 is stationary, so it is not moving. The situation I want to figure out is when Ship 1 moves far enough so that now the rope is fulling extended. This rope is just used to connect the two ships and has no other influence on the outcome. It only acts as a link for Ship 1 to apply forces to Ship 2 and vice versa. My problem is how do you calculate the resulting forces applied to Ship 1 and Ship 2. I know these force equations, f=ma = (m*dv)/dt. But I cant figure out the force since the acceleration of Ship 1 is 0. I know the mass and velocity of Ship 1, but am unsure of how to use it to calculate the forces. Also I dont know the resulting velocities of Ship 1 or Ship 2. I cannot assume Ship 1's final velocity will be zero, since Ship 1 may be a heavier ship than Ship 2 and may be able to pull Ship 2 with it. How bout if Ship 2 was also moving in the opposite direction?

##### Share on other sites
You could do this by implementing a spring like the one Chris Heckers demo, or with a verlet integrator using a simple stick constraint

##### Share on other sites
Well, could you drop me some physics terms or equations that are involved in this specific situation. I'm not really interested in the spring physics associated with rope since I can ignore that.

Maybe a sentence or two explaining a free body diagram would help.

##### Share on other sites
What you have is basically a collision system. When the rope snaps taught, it's the same as if ship 1 has just collided with ship 2. If you already have a collision system then just plug it into that.

Hint: Total energy = (1/2)m_1*v_1^2 + (1/2)m_2*v_2^2

Energy before collision = energy after collision

##### Share on other sites
First, you must think about how you want rope to work - as elastic rope or as inelastic rope (e.g. with some dampers attached). Elastic rope will expand a bit, then it will push spaceships to eachother, and spaceships will finally exchange their places, and in completely eastic case, them will "bounce" again and again. No energy is "lost", after we have same kinetic energy as before. Inelastic rope will not push spaceships to eachother, and after expansion of rope, them will move with same speed. Some kinetic energy is "lost" (converted to heat of rope or dampers).

If we assume that rope is stiff, it is necessary to deal with momentum and impulses, not really forces. Impulse it's change of momentum in some very short time dt by some big force, like big force of slightly expanded rope. Momentum it's m*v
Also, are your problem is 1D or 2D?
1D it's in case if velocity is parallel to rope, 2D if there's some angle.
1D case is equivalent to collision (elastic equivalent to bouncy collision and inelastic to collision when 2 objects become glued together).
2D case is more complex.

Some general physics:
if ship 1 have m1 and ship 2 have m2, and velocities is v1 and v2, we have that
2.) m1*v1+m2*v2 = m1*v1'+m2*v2'
where v1' and v2' it's velocities after rope is extended
It comes from conservation of momentum in closed system.

Let we are looking at spaceships from system of reference of center of mass. That is, we move with velocity
v=(m1*v1+m2*v2)/(m1+m2)
and look at these things.

We will see velocities u1 and u2 that
u1=v1-v
u2=v2-v
u1'=v1'-v
u2'=v2'-v
If you substitute above into first side of 2.) , you'll get
m1*u1+m2*u2=
m1*(v1-(m1*v1+m2*v2)/(m1+m2))+m2*(v2-(m1*v1+m2*v2)/(m1+m2))=
m1*v1+m2*v2-(m1*(m1*v1+m2*v2)/(m1+m2)+m2*(m1*v1+m2*v2)/(m1+m2))=
m1*v1+m2*v2-((m1*m1*v1+m1*m2*v2)/(m1+m2)+(m2*m1*v1+m2*m2*v2)/(m1+m2))=
m1*v1+m2*v2-( m1*m1*v1 + m1*m2*v2 + m2*m1*v1 + m2*m2*v2 )/(m1+m2)=
m1*v1+m2*v2-( m1*m1*v1 + m2*m1*v1 + m1*m2*v2 + m2*m2*v2 )/(m1+m2)=
m1*v1+m2*v2-( (m1+m2)*m1*v1 + (m1+m2)*m2*v2)/(m1+m2)=0
So
m1*u1+m2*u2=0

Also, as you can see from 1, after extending of rope, center of mass will move with same velocity as before.

Looking from system of reference of center of mass, ships move in opposite directions (and if their masses is equal, with same velocities).
In case of completely inelastic collision, them will move with same velocity, that will be equal to velocity of center of mass. So, relatively to us, them will just stop moving.
And completely inelastic collision will be:
ships are moving until rope is extended, then both stop moving. That is, u1'=0,u2'=0
Completely elastic collision will be
u1'=-u1
u2'=-u2
Something inbetween will be
u1'=-k*u1
u2'=-k*u2
where 0<=k<=1 (0 for perfectly inelastic, 1 for perfectly elastic)

So, pseudocode:
v=(m1*v1+m2*v2)/(m1+m2)
u1=v1-v
u2=v2-v
u1_after_collision=-k*u1;
u2_after_collision=-k*u2;
v1_after_collision=u1_after_collision+v;
v2_after_collision=u2_after_collision+v;

That's for 1D case (velocity is parallel to rope) . In case velocity is not parallel to rope, it's more complicated, whole thing will start to spin, it'll be needed to consider conservation of rotational momentum aswell.

And, back to the force: you can compute force between objects only if you treat your rope as spring. With really hard spring, there will be strong force for small time, with weak spring, there will be smaller force acting for longer time; velocities and masses alone is not enough to find what maximal force had been there. You can get integral of force*dt (change of momentum of ship 2 (is equal to -change of momentum of ship 1)) using above equations.

[Edited by - Dmytry on June 15, 2005 5:11:12 AM]

##### Share on other sites
Alright, thanks a lot. That conservation of momemtum and energy helped a lot.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634131
• Total Posts
3015727
×