Rocket/Space Game (Was "Rigid body rotations")

A spot for all things TestTube
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Rocket/Space Game (Was "Rigid body rotations")

Post 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?
Last edited by A Random Player on Sat Aug 16, 2014 2:56 pm, edited 1 time in total.
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Re: Rigid body rotations

Post 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?
Nobody ever notices my signature. ):
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Rigid body rotations

Post by A Random Player »

A little rocket game. (Whose physics has changed twice already :P)
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Rocket Game

Post 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? :P
Nobody ever notices my signature. ):
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Rocket Game

Post 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? :P
I might actually try making that if I have time :P
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

That

Post by exfret »

And "that" would be?
Nobody ever notices my signature. ):
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Rigid body rotations

Post by A Random Player »

Oh whoops, the centrifugal game :P
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Centrfugal Game

Post 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.
Nobody ever notices my signature. ):
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Rigid body rotations

Post 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?
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Rigid body rotations

Post 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.
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
Post Reply