Dynamics
Dynamics
Simulation is the most popular method to create computer animation procedurally.
Unlike kinematics, dynamics concerns forces and their effect on motion.
Animation Equation
The basic equation: ??
- Any system has a configuration
- It also has a velocity
- Usually have some constraints
is called the state of the system!
To change, we need to apply forces! .
Generalized Coordinates
Often we describe systems with many moving pieces.
is the collection of the position of the objects.
Then, we can think of as a single point moving along a trajectory in !
Generalized Velocity
Similarily, is the collection of the velocity of the objects.
Ordinary Differential Equations (ODE)
Many dynamical systems can be described via an ODE in generalized coordinates.
Ordinary means only derivatives in time (but not space) is used.
Higher order ODEs
In face, newton's law is second order ODE!
Higher order ODEs can be written as first order ODE by introducing dummy variables.
Therefore, we can only focus on first order ODEs.
Lagrangian Mechanics
Lagrangian is defined as kinetic energy subtracted by potential energy.
Dynamics can be given by Euler-Lagrange equation.
This is a extreme way to write ... Why do we even use this?
Newton's law use coordinates, but lagrangian equation use energy.
Therefore, it can be used for systems where it is difficult to define coordinates. e.g. Optics.
Example - Pendulum
Use angle as a coordinate!
Let is the mass, then we can calculate kinetic and potential energy.
By solving lagrangian equation, we get !
Problem: we don't have a closed form solution...
Chaotic systems
If we perturb input, output will change widely.
Even Lagrangian equation can't help us...
Only numerical solution exists!
e.g. Double pendulum
Pendulum swings from pendulum!
e.g. n-Body problem
If objects interact with each other gravitationally, how does the objects move?
e.g. Rigid body
We were assuming point mass so far!!!
What happens if we drop the rigid body?
Even with a small orientation difference, object will bounce in all directions.
Particle Systems
Model phenomena as a large collection of particles.
Each particle has a behavior described by forces.
Then particles are numerically computed!
Normally, forces are only applied by k-nearest neighbors.
Fast hierarchical data structure (kd-tree, BVH) can be used!
e.g. crowds, particle-based fluids, granular materials (such as snow), molecular dynamics, mass-spring system (clothes can be simulated with 2D spring!!!), hair, ...
Extremely common in graphics/games!
Simple equation + easy to scale up/down!
Example - Flocking
Each bird is a particle.
Use simple forces:
- Attraction to center of neighbors
- Repulsion from individual neighbors
- Alignment toward average trajectory of neighbors
To simulate flocking, solve large system of ODEs!