Page 1 of 5
Rocket/Space Game (Was "Rigid body rotations")
Posted: Sat Nov 09, 2013 1:25 pm
by A Random Player
Assume I have a collection of point masses attached together with infinitely rigid massless rods in an ideal frictionless Newtonian universe. (Ah, the joy of physics-world.)
The masses are suddenly given velocities. How would one calculate the resulting translational and rotational speed?
(No, this isn't for homework, it's for a game/program I'm trying to make.)
What I have so far is give the collection of objects an extra velocity to make the total translational momentum be 0. Then we calculate the "pulling" momentum of each mass by breaking the velocities into the radial and "towards/away from center" velocities. Add together the towards/away velocities. The remaining velocities are all radial. Calculate the total... Not sure what this is called. Distance of each object from CoM * mass * velocity. Find the average rotational momentum from those, then add up the velocity removed at the beginning and the sum of the towards/away velocities to get translational.
Is this right?
Re: Rigid body rotations
Posted: Sun Nov 10, 2013 12:03 pm
by exfret
Sorry, I know what you're talking about, but I haven't an idea how to deal with this. I'm just curious: what type of program are you making?
Re: Rigid body rotations
Posted: Sun Nov 10, 2013 12:12 pm
by A Random Player
A little rocket game. (Whose physics has changed twice already

)
Rocket Game
Posted: Sun Nov 10, 2013 1:05 pm
by exfret
So, what's the rocket game about? Navigating mazes from space? Traveling near light speed? The effects of the centrifugal forces on the rocket?

Re: Rocket Game
Posted: Sun Nov 10, 2013 1:22 pm
by A Random Player
exfret wrote:So, what's the rocket game about? Navigating mazes from space? Traveling near light speed? The effects of the centrifugal forces on the rocket?

I might actually try making that if I have time

That
Posted: Sun Nov 10, 2013 1:27 pm
by exfret
And "that" would be?
Re: Rigid body rotations
Posted: Sun Nov 10, 2013 1:37 pm
by A Random Player
Oh whoops, the centrifugal game

Centrfugal Game
Posted: Sun Nov 10, 2013 3:12 pm
by exfret
Maybe you could get some code for Andy. Of course, this wouldn't help with your problem right now, but it could still give you a head start in making your game. Are there any games that include what you're trying to do? Maybe it could be possible to copy them.
Re: Rigid body rotations
Posted: Tue Nov 12, 2013 7:50 pm
by testtubegames
A Random Player wrote:Assume I have a collection of point masses attached together with infinitely rigid massless rods in an ideal frictionless Newtonian universe. (Ah, the joy of physics-world.)
The masses are suddenly given velocities. How would one calculate the resulting translational and rotational speed?
(No, this isn't for homework, it's for a game/program I'm trying to make.)
What I have so far is give the collection of objects an extra velocity to make the total translational momentum be 0. Then we calculate the "pulling" momentum of each mass by breaking the velocities into the radial and "towards/away from center" velocities. Add together the towards/away velocities. The remaining velocities are all radial. Calculate the total... Not sure what this is called. Distance of each object from CoM * mass * velocity. Find the average rotational momentum from those, then add up the velocity removed at the beginning and the sum of the towards/away velocities to get translational.
Is this right?
Ooh! Just the kinda problem I like. And sounds pretty familiar to questions I've had to ask myself in the past
Don't have much time to draft an answer right now - but wanted to let you know I saw it. My first question for you, though, is what is giving these bodies their own velocities? Since, if it's a rocket, each might have a particular force it's contributing, instead, which would lead to a different result. What you're asking right now sounds tantamount to: "all these pieces happen to be flying around with their own velocities, then at time x, they are all suddenly attached to each other". Does that sound about right?
Re: Rigid body rotations
Posted: Tue Nov 12, 2013 10:35 pm
by A Random Player
testtubegames wrote:A Random Player wrote:Assume I have a collection of point masses attached together with infinitely rigid massless rods in an ideal frictionless Newtonian universe. (Ah, the joy of physics-world.)
The masses are suddenly given velocities. How would one calculate the resulting translational and rotational speed?
(No, this isn't for homework, it's for a game/program I'm trying to make.)
What I have so far is give the collection of objects an extra velocity to make the total translational momentum be 0. Then we calculate the "pulling" momentum of each mass by breaking the velocities into the radial and "towards/away from center" velocities. Add together the towards/away velocities. The remaining velocities are all radial. Calculate the total... Not sure what this is called. Distance of each object from CoM * mass * velocity. Find the average rotational momentum from those, then add up the velocity removed at the beginning and the sum of the towards/away velocities to get translational.
Is this right?
Ooh! Just the kinda problem I like. And sounds pretty familiar to questions I've had to ask myself in the past
Don't have much time to draft an answer right now - but wanted to let you know I saw it. My first question for you, though, is what is giving these bodies their own velocities? Since, if it's a rocket, each might have a particular force it's contributing, instead, which would lead to a different result. What you're asking right now sounds tantamount to: "all these pieces happen to be flying around with their own velocities, then at time x, they are all suddenly attached to each other". Does that sound about right?
Well, I'm using Newtonian/leapfrog approximation (not sure which since they look the same); the point masses are rockets, and they're connected together by.... Magic? So for each step in the simulation, the individual rockets accelerate their actual acceleration * the timestep. The forces would need to transfer to the others rockets, which are modeled by the rigid connections.
Your analogy works, for one instant. All the pieces are flying around, but at all times, they are suddenly attached to each other, if that makes any sense.