Documente Academic
Documente Profesional
Documente Cultură
Reference www-2.cs.cmu.edu/afs/cs/user/baraff/www/pbm
4
10
11
12
Eulers Method
x(t + t) = x(t) + t f(x, t) A numerical solution A simplification from Tayler series Discrete time steps starting with initial value Simple but not accurate Bigger steps, bigger errors O(t2) errors Can be unstable Not even efficient
13
k1 = k2 = k3 = k4 =
h h h h
f(x0, t0) f(x0 + k1/2, t0 + h/2) f(x0 + k2/2, t0 + h/2) f(x0 + k3, t0 + h)
14
Inertia
The tendency of an object at rest to remain at rest. The mass is a measure of the inertia of the object. The force is the general mechanism for changing the mechanical state of an object. A force is a vector quantity. An external force is one where source is outside the system of interest. The standard unit of measurement for the magnitude of a force is a newton. A newton is the required force magnitude to give 1kg mass 1m/sec2 acceleration.
15
16
17
18
Forces
Gravitational forces Spring forces Friction and other dissipative forces
19
Fgravity =
GmM r2
20
21
Spring Forces
Hookes Law F = -c U c > 0, spring constant U, displacement F pull U > 0 F push U < 0
22
Dissipative Forces
A dissipative force is one for which energy of the system decreases when motion takes place. A simple model for a dissipative force :
23
Friction (1/2)
A frictional force between two objects in contact opposes the sliding of one (moving) object over the surface of adjacent object (nonmoving). The friction force is tangent to the contact surface and opposite in direction to the velocity of the moving object. The magnitude of the frictional force is assumed to be proportional to the magnitude of the normal force between surfaces. ck = Ffriction / Fnormal The kinetic friction force is modeled as F = - ck v / |v|, if v is not zero = 0, if v is zero ck is referred to as the coefficient of kinetic friction
24
Friction (2/2)
Static friction cs, coefficient of static friction cs = max(Ffriction)/ Fnormal
1 static case
25
Viscosity
A typical occurrence of this type of force is when an object is dragged through a thick fluid. The force is modeled to have the direction opposite to that of the moving object.
26
Torque
Moment of force F is the applied force. r is the position of the applied force relative to the mass center. The torque is the quantity :
=rxF
The torque will generate a local rotation with respect to the mass center. Two forces of equal magnitude, opposite direction, but different lines of action are said to be a couple.
27
Equilibrium
Forces on an object are said to be concurrent if the lines of action all pass through a common point. Balanced forces mean the sum of the forces is zero.
concurrent balanced
28
Momentum
Linear momentum Angular momentum
29
Linear Momentum
The linear momentum is the product : p=mv m is the mass v is the velocity For a system of p particles of masses mi and velocity vi for i is in the range of (1, p), the linear momentum is p = mi vi
i=1 p
If the object is a continuum of mass that occupies a region R, the linear momentum is p=
v dm = v dR
R R
Angular Momentum
Angular momentum can be treated as a measure of inertia to continue rotating about an axis. L=rxp=rxmv Angular momentum for a set of particles, L = ri x mi vi
i=1 p
If the object is a continuum of mass that occupies a region R, the angular momentum is L=
r x v dm = r x v dR
R R
Moment of Inertia
The measure of the rotational inertia of a body about an axis is the moment of inertia. For a single particle, moment of inertia is I = m r2 m is the mass r is the distance to an axis
But for a rigid body object, the inertia will be integrated as a function of mass and the geometry shape. We will discuss it in the section of Rigid-body Dynamics Moment of inertia in one dimension Moment of inertia in two dimension Moment of inertia in three dimension Mass and Inertia tensor of a solid polyhedron
32
Particle Dynamics
Particles are objects with Mass Position Velocity Respond to forces But no spatial extent (no size!) Point mass Based on Newton Laws f = ma .. x=f/m . . v = f / m, v = x
33
34
Particle States
Position Velocity Mass Life Etc Bounce rate Opacity Color In game application, we always put a billboard object with texture animation on a particle to simulate the geometry shape of the particle.
35
typedef struct { Particle *p /* array of pointers to particles */ int n; /* number of particles */ float t; /* simulation clock */ } *ParticleSystem;
Particle n time
x v f m
x v f m
x v f m
x x v v f f m m
36
37
38
39
40
42
43
44
Linear Velocity
We call x(t) and R(t) the position and orientation of the body at time t.
46
47
48
49
50
Stress Strain
51