Particles and Springs

This is an introduction to physically-based animation using particle systems.

Start

Download, decompress and run physics.zip. Command run -h gives detail on parameterization and user interaction.
Additionally, a basic html documentation is given in physics/doxygen/html/index.html. The programs displays a moving sphere animated using a physical particle. There is also a fixed one at the origin of the world coordinate system.

question Parameterization Add a new command line option to tune the velocity of the moving particle. Explain how you do.

Understand the program

question Integration The weight is taken into account, however the particle translates uniformly. What has been forgotten by the programmer ?

question Fixed object The fixed particle does not move because it has been assigned a null mass. Explain the trick used to obtain fixed objects using a null mass

Spring

Insert a spring with rest length = 0 and damping ratio = 0.1 between the two particles using the available method. Try different stiffness values.

question Stiffness Experimentally, what is the maximum possible stiffness value for a plausible simulation of this scene ? (leave the other default values unchanged)

A string

Model a command line-parameterizable string made of n particles (including a fixed one) all with mass m (except the fixed one), radii r, and all springs with stiffness k, damping ratio d and rest length l.

question Stiffness Experimentally, can you apply the same stiffness value for a plausible simulation ? (all other values similar)

User interaction

Allow the user to interactively shake the fixed particle using the mouse, by adapting method myMouseMoveCallback.

question Interaction Why is it difficult to have the particle strictly following the mouse pointer ? (This is a purely geometric question. Do not fix the problem)

Air damping

Implement a viscous force proportional and opposed to the velocity of each particle: f=-air_damping*v where v is the velocity of the particle and air_damping is a positive value.

question Air damping Give one example of motion for which the consequences of air damping and spring damping differ significantly.

Particle-plane collisions

A plane is modeled in file dynamics.cpp using variables ground_point and ground_normal. Uncomment the appropriate code to implement the collision and test it using a single sphere with no spring.

question Bounce What is the physically plausible range of bouncing coefficients ?

Particle-particle collisions

Implement the empty particleParticleCollision method. Apply the same idea as in particlePlaneCollision except that:

question Collision Describe an experiment (velocities before and after collision) using two particles with different masses to illustrate (this is not a proof) that your collision processing is physically plausible.

Propagation

We now consider an arbitrary number of particles in contact. Implement, if not done already, the collision processing of all the pairs of particles. Test your program the following way:
  1. apply a null gravity and perfectly elastic collisions
  2. model a row of n spheres aligned in contact
  3. add another particle which hits the first particle of the row, so that the impact should propagate up to the last one
  4. check if, as in the ideal case, the motion is totally propagated to the opposite particle

question Propagation By applying step-by-step animation, check if the behavior is the same if the particle row is hit from the other side. Give a pseudocode which guarantees the same behavior.