Presentation is loading. Please wait.

Presentation is loading. Please wait.

Collisions Collision Avoidance - force fields, steer to avoid, etc.

Similar presentations


Presentation on theme: "Collisions Collision Avoidance - force fields, steer to avoid, etc."— Presentation transcript:

1 Collisions Collision Avoidance - force fields, steer to avoid, etc.
- as in flocking Collision Detection - calculating when objects overlap - during a time interval Collision Response - computation v. accuracy - back up time v. after-the-fact

2 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 Either back time up to point of collision and go from there Or Respond to collision only at time steps d1+d2 d1 d2 T = t + Dt*d1/(d1+d2)

3 Kinematic Response Negate velocity component in direction of normal
v’ = v - 2*(v.N) N v N (v.N) N

4 Penalty Method F = k*d d Spring with zero rest length

5 Testing Planar Polyhedra
Point inside a convex/concave polyhedron test Edge-plane intersection Temporal aliasing

6 Swept Volumes Compute motion of one relative to other
Compute swept volume Determine if other object intersects swept volume Tractable only for simple motion

7 Impulse Force of Collision
J = F * Dt J = F * Dt = M*a*Dt = M*Dv = D (M*v) = DP (Notation: J = j*N) v+rel = -e*v -rel Effect of collision has linear and angular components

8 Relative velocity Determine contact normal AxB A B Velocity of a point (pA (t)) = linear + angular velocities = vA(t) + wA (t) X rA Relative velocity is difference of velocity of 2 points of contact

9 Update Velocities after Collision
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)

10 Computing Impulse v+rel = -e*v -rel pA (t)) = vA(t) + wA (t) X rA
v+rel = n* (p+A(t) - p+B(t)) v+rel = n * (v+A(t) + w+A(t) x r A -v+B(t) - w+B(t) x rB)

11 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

12 Other Forces Gravity Friction Viscosity Springs (Hooke’s law)

13 Friction Supporting object Static friction Fs = us * FN Fs
Resting contact F Normal force FN

14 Friction Supporting object Fk = uk * FN Kinetic friction Fk v
Resting contact F FN Normal force Static friction Fs = us * FN

15 Gravity Fgravity = G*m1*m2/r2
a object= F/m object = G*mearth/r2earth = 32 ft/s2 = 9.8 m/s2

16 Viscosity 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

17 Springs (Hooke’s law) Spring’s rest length: exerts zero force
Fspring = kspring * (x - xrest) x xrest F x F

18 Spring Mesh Edges => springs Internal springs to stabilize shape

19 Damping Calm down spring oscillations Fdamping = - kdamping * v
F = (x’ - xrest) * kspring - v * kdamper

20 Forces - Recap Based on position: springs, gravity, wind,
Based on velocity: viscosity, dampers, Based on object interactions: collisions, friction Give rise to accelerations


Download ppt "Collisions Collision Avoidance - force fields, steer to avoid, etc."

Similar presentations


Ads by Google