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")

Postby A Random Player » Sat Nov 09, 2013 1:25 pm

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: 584
Joined: Sun Jul 28, 2013 8:40 pm

Re: Rigid body rotations

Postby exfret » Sun Nov 10, 2013 12:03 pm

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

Postby A Random Player » Sun Nov 10, 2013 12:12 pm

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: 584
Joined: Sun Jul 28, 2013 8:40 pm

Rocket Game

Postby exfret » Sun Nov 10, 2013 1:05 pm

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

Postby A Random Player » Sun Nov 10, 2013 1:22 pm

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: 584
Joined: Sun Jul 28, 2013 8:40 pm

That

Postby exfret » Sun Nov 10, 2013 1:27 pm

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

Postby A Random Player » Sun Nov 10, 2013 1:37 pm

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: 584
Joined: Sun Jul 28, 2013 8:40 pm

Centrfugal Game

Postby exfret » Sun Nov 10, 2013 3:12 pm

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: 1007
Joined: Mon Nov 19, 2012 7:54 pm

Re: Rigid body rotations

Postby testtubegames » Tue Nov 12, 2013 7:50 pm

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

Postby A Random Player » Tue Nov 12, 2013 10:35 pm

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!


Return to “General Chat”

Who is online

Users browsing this forum: No registered users and 1 guest