Forces basic physics Springs Hookes law Damping Gravity
Forces - basic physics Springs (Hooke’s law) Damping Gravity Friction - static and kinetic Viscosity Rick Parent - CIS 682
Basic Physics Accumulate forces, calculate acceleration Implicit assumption is constant acceleration over time slice Rick Parent - CIS 682
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 Rick Parent - CIS 682
Springs (Hooke’s law) Spring’s rest length: exerts zero force x xrest F x F Rick Parent - CIS 682
Spring Mesh Edges => springs Internal springs to stabilize shape Rick Parent - CIS 682
Damping Calm down spring oscillations Rick Parent - CIS 682
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? Rick Parent - CIS 682
Mass-Spring-Damper System For each point Initialize force with wind For each spring Calculate spring-damper force spring. point 1. force += force spring. point 2. force -= force For each point acc = gravity acc += mass/force new. Vel = velocity + acc*dt position += dt*(velocity+new. Velocity)/2 velocity = new. Velocity Rick Parent - CIS 682
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 Rick Parent - CIS 682
Angular Springs 1) Use dot product of normals (cosine) 2) Take inverse cosine and use angle 3) Place a linear spring between ends of triangles Rick Parent - CIS 682
Constrain Forces (soft constraints) Create temporary restoring forces (springs) when constraint violated F F F Non-penetration Fix to surface Rick Parent - CIS 682
Friction Supporting object Resting contact Normal force Fs F FN Static friction Rick Parent - CIS 682
Friction Supporting object Resting contact Normal force Fk v F FN Static friction Kinetic friction Rick Parent - CIS 682
Gravity Rick Parent - CIS 682
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: Rick Parent - CIS 682
- Slides: 15