Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Angular deflection problem in asteroid game

  1. Jun 21, 2011 #1
    I have written a computer game which involves 2D asteroids spinning and colliding with one another. Out of some kind of pride or something I wrote my own physics engine to handle the collisions, even though I never studied physics. (Please excuse therefore any incorrect terminology). Nevertheless, it works well overall and I have a good grasp on what's going as a result of having to having to think everything through from first principles. But I do have one problem.

    When two objects collide I calculate a linear and an angular deflection vector for each object based on their momentum, spin and mass. The method looks something like this:

    1 Project the angular and linear momenta of both objects onto the line perpendicular to the surface at the point of collision.

    2 Add these momenta all together into a single collision momentum. As the objects are perfectly elastic, I multiply by two, so that when the deflection is subtracted from the current momentum, the objects will bounce.

    3 Divide this up between the two objects to provide an overall deflection for each object.

    4 Project this momentum vector onto the line to the center of the object from the collision point to get a linear deflection.

    5 The remainder of the momentum is angular momentum and gets translated into spin (project the deflection vector onto a tangent to the path traced by the collision point as it rotates- I don't have the terminology happening here at all!).

    The problem is how much spin to impart for a given amount of angular deflection. At the moment I simply add the angular deflection vector to the rotating speed of the surface at the point of the collision. So if the linear deflection vector and the angular deflection vector both have a length of 3, I subtract 3 units of speed from the object's linear momentum, and I work out the spin change required such that the surface will rotate 3 units slower (or faster) at the point of contact.

    But this seems wrong, because spinning an object's surface with a speed of 3 would surely require less energy than accelerating it 3 units of speed linearly, since the mass nearer the center will be moving more slowly than 3. My approximation works OK for fairly regular asteroids, but I'm concerned about more irregular ones. And given the weird shapes of some of my asteroids (they are actual asteroid photographs), I have no idea how to go about calculating the correct deflection.

    Any help appreciated greatly - I hope you can understand my lay explanation.
  2. jcsd
  3. Jun 21, 2011 #2
    OK, this isn't exactly drawing a flood of replies, and I guess I can understand why. It's probably hard to follow since I've worked out the problem from first principles rather than using physics terms and formulae. So let me simplify the question, and this might help me work out what I need to know.

    What is the difference in the energy required to impart a spin to a perfect, solid sphere of uniform density such that the angular speed at the surface is n, compared to the energy required to accelerate the whole sphere to that same speed n linearly? This would have to be a constant, right?
  4. Jun 21, 2011 #3


    User Avatar

    That's pretty easy to calculate, knowing that rotational kinetic energy is 1/2 Iω2, while linear is 1/2mV2.
  5. Jun 21, 2011 #4
    Thank you cjl. As noted above I never studied physics, so you'll need to explain what I and ω represent. (I do at least know 1/2mV2!)
  6. Jun 21, 2011 #5
    Never mind. I looked up rotational kinetic energy, then moment of inertia, and now it all becomes clear how to solve my problem. Thanks.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Angular deflection problem in asteroid game