COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Bouncing object of arbitrary geometry?

• Follow

```Hello,

I have often asked myself simulations where a stare cube, or even more complicated body, falls on a solid ground and bounces off. Also, it is possible (e.g. in games) to create bodies like made out of springs, bodies that experience a deformation when they hit the ground (or other bodies).

How are such things created and programmed? In classical mechanics (seen from a physics student's point of view), we use differential equations which we solve numerically once we've figured them out. But objects physicists treat are usually much more simple than cubes, as even e.g. the three body problem of point charges and its transition to chaos are complex enough to study. But such simulations as described above probably take a completely different approach, and I am curious about that. Maybe you can give me some links or some literature, or just some general ideas?

Also, if I wanted to program a solid cube bouncing off a solid surface, how could I start / approach this undertaking?

Alexander
```
 0

```"Alexander" <alexander.erlich@gmail.com> wrote in message <he94at\$33r\$1@fred.mathworks.com>...
> Hello,
>
> I have often asked myself simulations where a stare cube, or even more complicated body, falls on a solid ground and bounces off. Also, it is possible (e.g. in games) to create bodies like made out of springs, bodies that experience a deformation when they hit the ground (or other bodies).
>
> How are such things created and programmed? In classical mechanics (seen from a physics student's point of view), we use differential equations which we solve numerically once we've figured them out. But objects physicists treat are usually much more simple than cubes, as even e.g. the three body problem of point charges and its transition to chaos are complex enough to study. But such simulations as described above probably take a completely different approach, and I am curious about that. Maybe you can give me some links or some literature, or just some general ideas?
>
> Also, if I wanted to program a solid cube bouncing off a solid surface, how could I start / approach this undertaking?
>
>
> Alexander

Accurate models of these things often require some
work. For example, consider a simple scenario - the
"reverse spaghetti problem".

What is the reverse spaghetti problem? The spaghetti
problem is to model the path of the tip of a piece of
spaghetti, as you suck it into your mouth. Why might
it flip up and hit the tip of your nose? The reverse
spaghetti problem is to model the path of the tip of
the flexible beam, as it extrudes from your mouth.
Even worse, suppose as this beam extends out,
suppose it hits against wall that blocks the path of
the spaghetti?

Maybe it seems easy to model this process, maybe
not. I will point out that a friend of mine earned
his doctorate with a thesis on this topic. Models of
mechanical systems like this can be easy, if you
choose to ignore some aspects of the physical
system, or more difficult, depending on how much
of the real world you allow to intrude into the
model.

The point is, how much of the real world do you
allow into a model of a bouncing cube? You might
start out with a spherical cube. Yeah, I know, this
seems a contradiction, but a sphere might be an

Is the cube homogeneous in its material properties?
Are they the same in all directions? (I.e., is it
isotropic or anisotropic? (A block of wood would
probably be anisotropic, since the elastic properties
will be differ in each direction, but a block of rubber
or a block of steel is probably well modeled as an
isotropic material.)

Is it rotating as it falls? What are the properties of
the ground on which it falls? Is the surface a
linearly elastic medium? (Dirt probably is not well
modeled as linearly elastic, but within limits, rubber
may probably be adequately modeled as such.)

At an even deeper level, any time two objects
interact, there is some probability that one or
both of them will exhibit nonlinear elastic behaviors.
For example, if a crack appears, this is nonlinear,
and very nasty to model. But any time you have
elastic deflections of a material, if you look deeply
enough, there will be stuff like this happening at
a molecular level. So a truly complete model of
such a system might want to include far more
than just simple Newtonian mechanics. Yeah, I
know. Really nasty.

It is a skill to know your problem, and to know
which terms in such a physical model can be
ignored to achieve a realistic model that can
be solved in a finite amount of time.

John
```
 0

```Alexander wrote:
> Hello,
>
> I have often asked myself simulations where a stare cube, or even
> more complicated body, falls on a solid ground and bounces off. Also,
> it is possible (e.g. in games) to create bodies like made out of
> springs, bodies that experience a deformation when they hit the
> ground (or other bodies).
>
> How are such things created and programmed? ...

In addition to John's essay, many (most???) of the simulations of
complex structural problems are computationally accomplished via dynamic
finite element methods.

--
```
 0

```Hi,

I do not at all believe that the inverse spaghetti problem, or even the problem of a pending wire, is easy to model ;-)

Still, I wonder how e.g. games do the trick.

Take Half Life 2: You have cubed and more compicated geometries bouncing on different kind of grounds. There is also epasticity, water etc. all in one engine. You can e.g. put crates onto crates, pile them up, buld a tower. Then remove the lowest crate and you can observe how all of the above crates collapse.

Surely, they don't use differential equations, or at least not for very long-termed computations?

I suppose this is exactly what confuses me: If I have to model something, I think about it, make simplifications, find the differential equations, fail solving them by hand, use R-K. In these games, while removing the crate from the piled-up tower of crates, I continuously change the configuration of the whole system. In terms of my simple understanding, the differential equations must continuously be re-solved, and eventually, changed, reformulated (or perhaps the program picks another set of DEs).

How does that work?
```
 0

```"Alexander" <alexander.erlich@gmail.com> wrote in message <he9cor\$548\$1@fred.mathworks.com>...
> Hi,
>
>
> I do not at all believe that the inverse spaghetti problem, or even the problem of a pending wire, is easy to model ;-)
>
> Still, I wonder how e.g. games do the trick.
>
> Take Half Life 2: You have cubed and more compicated geometries bouncing on different kind of grounds. There is also epasticity, water etc. all in one engine. You can e.g. put crates onto crates, pile them up, buld a tower. Then remove the lowest crate and you can observe how all of the above crates collapse.
>
> Surely, they don't use differential equations, or at least not for very long-termed computations?
>
> I suppose this is exactly what confuses me: If I have to model something, I think about it, make simplifications, find the differential equations, fail solving them by hand, use R-K. In these games, while removing the crate from the piled-up tower of crates, I continuously change the configuration of the whole system. In terms of my simple understanding, the differential equations must continuously be re-solved, and eventually, changed, reformulated (or perhaps the program picks another set of DEs).
>
> How does that work?

In any such problem, they probably DO use
differential equations. Equations of motion are
essentially that. A falling object is subject to
the acceleration of gravity. Euler's method is
one simple way to solve a system of such
bodies, and it is not uncommon to see it used
in simple simulations. (There are problems with
this method, but my point is that a simple
method may often be employed here. Recall
my comments from the previous response. The
art of these models is in knowing how simple
one can make the model and still achieve realistic
predictive ability.)

Elastic collisions between pairs of bodies may use
simple approximations to deal with their behavior.
So you can model how a ball bounces with a simple
coefficient of restitution, or you can model the
deformation of the ball as an elastic body using
finite element approximations. I don't know what
the game designers found necessary to provide
a reasonable looking simulation of this system.
I'll bet that there are university level courses in
game design to be found though.

John
```
 0

4 Replies
164 Views

5/24/2013 10:28:55 PM