Forces - basic physics Springs (Hooke’s law) Damping Gravity Friction - static and kinetic Viscosity
Basic Physics Accumulate forces, calculate acceleration Implicit assumption is constant acceleration over time slice
Integration For arbitrary function, f We know the derivative (acceleration). We need to update the function based on derivative information Much mathematics about how to update f based on its derivative Runga-Kutta integration Implicit Euler integration Etc. Accuracy v. time slice
Springs (Hooke’s law) Spring’s rest length: exerts zero force x xrest
Spring Mesh Edges => springs Internal springs to stabilize shape
Damping Calm down spring oscillations
Mass-Spring-Damper System Define point masses postion velocity mass force fixed? Define springs point 1 point 2 rest length kspring kdamper Multiple time samples per frame?
Mass-Spring-Damper System For each point Initialize force with wind For each spring Calculate spring-damper force spring.point1.force += force spring.point2.force -= force For each point acc = gravity acc += mass/force newVel = velocity + acc*dt position += dt*(velocity+newVelocity)/2 velocity = newVelocity
Randomize Controlled randomness adds more interest To initial values (positions, velocities) To force fields (wind direction, wind speed) To spring constants, masses To joint angles Proximal joints: lower amplitude Distal joints: higher amplitude Coordinate frequence and phase
Angular Springs Use dot product of normals (cosine) Take inverse cosine and use angle Place a linear spring between ends of triangles
Constrain Forces (soft constraints) Create temporary restoring forces (springs) when constraint violated F F F Fix to surface Non-penetration
Friction Supporting object Fs Resting contact F FN Normal force Static friction Fs Resting contact F Normal force FN
Friction Supporting object Kinetic friction Fk v Resting contact F FN Normal force Static friction
Gravity
Viscosity kv - depends on shape of object n - depends on properties of liquid For spherical object: Terminal velocity - viscosity and gravity balance E.g., for sphere: