200 likes | 332 Views
Collision Response - computation v. accuracy - back up time v. after-the-fact. Collisions. Collision Avoidance - force fields, steer to avoid, etc. - as in flocking. Collision Detection - calculating when objects overlap - during a time interval.
E N D
Collision Response - computation v. accuracy - back up time v. after-the-fact Collisions Collision Avoidance - force fields, steer to avoid, etc. - as in flocking Collision Detection - calculating when objects overlap - during a time interval
Either back time up to point of collision and go from there Or Respond to collision only at time steps d1 d1+d2 T = t + Dt*d1/(d1+d2) d2 Point-Plane Collision - Detect Collision Every time step, see if point is one “wrong” side of plane Detect collision by planar equation if a*x+b*y+c*z +d < 0 => collision
v’ = v - 2*(v.N) N N v (v.N) N Kinematic Response Negate velocity component in direction of normal
F = k*d Spring with zero rest length d Penalty Method
Temporal aliasing Testing Planar Polyhedra Point inside a convex/concave polyhedron test Edge-plane intersection
Swept Volumes Compute motion of one relative to other Compute swept volume Determine if other object intersects swept volume Tractable only for simple motion
J = F * Dt = M*a*Dt = M*Dv = D (M*v) = DP (Notation: J = j*N) Impulse Force of Collision J = F * Dt v+rel = -e*v -rel Effect of collision has linear and angular components
Determine contact normal AxB A B Velocity of a point (pA (t)) = linear + angular velocities = vA(t) + wA (t) X rA Relative velocity Relative velocity is difference of velocity of 2 points of contact
v+A = v -A + j*n/M A v+B = v -B + j*n/M B w+A = w-A + I -1A(t)*(r A x j*n) w+B = w-B + I -1 B(t)*(r B x j*n) Update Velocities after Collision
v+rel = n* (p+A(t) - p+B(t)) pA (t)) = vA(t) + wA (t) X rA Computing Impulse v+rel = -e*v -rel v+rel = n * (v+A(t) + w+A(t) x r A -v+B(t) - w+B(t) x rB)
Computing Impulse Forces Given: two points of contact and normal of contact Compute velocities of points of contact: va, vb Compute relative velocities in direction of normal If Vrelative > threshold // actually colliding Compute j PA += J PB -= J LA += rA x J LB -= rB x J Else if Vrelative < -threshold, then resting contact Else they are moving away from each other
Other Forces Gravity Friction Viscosity Springs (Hooke’s law)
Supporting object Fs Resting contact F FN Normal force Static friction Fs = us * FN Friction
Fk Fk = uk * FN Kinetic friction Friction Supporting object v Resting contact F FN Normal force Static friction Fs = us * FN
Gravity Fgravity = G*m1*m2/r2 a object= F/m object = G*mearth/r2earth = 32 ft/s2 = 9.8 m/s2
Fvis = -K*n*v K - depends on shape of object n - depends on properties of liquid K = 6*p*r For spherical object: Terminal velocity - viscosity and gravity balance m*g = 6*p*r*n*v Viscosity
x xrest Springs (Hooke’s law) Spring’s rest length: exerts zero force Fspring = kspring * (x - xrest) F x F
Spring Mesh Edges => springs Internal springs to stabilize shape
Damping Calm down spring oscillations Fdamping = - kdamping * v F = (x’ - xrest) * kspring - v * kdamper
Forces - Recap Based on position: springs, gravity, wind, Based on velocity: viscosity, dampers, Based on object interactions: collisions, friction Give rise to accelerations