Collisions Collision Avoidance force fields steer to avoid

  • Slides: 21
Download presentation
Collisions Collision Avoidance - force fields, steer to avoid, etc. - as in flocking

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 Rick Parent - CIS 682

Point-Plane Collision - Detect Collision Every time step, see if point is one “wrong”

Point-Plane Collision - Detect Collision Every time step, see if point is one “wrong” side of plane Detect collision by planar equation => collision Either back time up to point of collision and go from there Or Respond to collision only at time steps d 1 d 2 Rick Parent - CIS 682

Kinematic Response Negate velocity component in direction of normal N v Rick Parent -

Kinematic Response Negate velocity component in direction of normal N v Rick Parent - CIS 682

Penalty Method F = k*d Spring with zero rest length d Rick Parent -

Penalty Method F = k*d Spring with zero rest length d Rick Parent - CIS 682

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

Testing Planar Polyhedra Point inside a convex/concave polyhedron test Edge-plane intersection Temporal aliasing Rick Parent - CIS 682

Swept Volumes Compute motion of one relative to other Compute swept volume Determine if

Swept Volumes Compute motion of one relative to other Compute swept volume Determine if other object intersects swept volume Tractable only for simple motion Rick Parent - CIS 682

Impulse Force of Collision When two objects collide, how do you compute the reaction

Impulse Force of Collision When two objects collide, how do you compute the reaction to the collision so that the objects will translate and rotate away from each other? Rick Parent - CIS 682

Two objects, both translating and rotating in space, collide at points of contact Rick

Two objects, both translating and rotating in space, collide at points of contact Rick Parent - CIS 682

The user specifies the fraction of the relative velocity the points will have after

The user specifies the fraction of the relative velocity the points will have after collision Rick Parent - CIS 682

Right before the collision, the velocity of a point on an object has velocity

Right before the collision, the velocity of a point on an object has velocity due to both the translation and rotation of the object w(t) r(t) A v(t) Rick Parent - CIS 682

The relative velocity of the two points of contact is the difference in their

The relative velocity of the two points of contact is the difference in their individual velocities A B Rick Parent - CIS 682

Forces are applied along a direction normal to the contact surface to both objects

Forces are applied along a direction normal to the contact surface to both objects at the point of contact Rick Parent - CIS 682

Determine contact normal by the configuration of the contact Point-plane: normal to plane Ax.

Determine contact normal by the configuration of the contact Point-plane: normal to plane Ax. B Edge-edge: cross product of edges A B Rick Parent - CIS 682

Impulse Force of Collision An impulse is a force applied over (short) time Notation:

Impulse Force of Collision An impulse is a force applied over (short) time Notation: Where n is the direction along which the impluse is applied Rick Parent - CIS 682

The forces will move each point away from the contact by inducing both a

The forces will move each point away from the contact by inducing both a translation to the object and a rotation of the object Rick Parent - CIS 682

Update velocities after collision using impulse force impulse Rick Parent - CIS 682

Update velocities after collision using impulse force impulse Rick Parent - CIS 682

The magnitude of the force must be solved for that will satisfy the fraction

The magnitude of the force must be solved for that will satisfy the fraction of relative velocity of the points after the collision Rick Parent - CIS 682

Set up equations for the relative velocity after collision along direction normal to plane

Set up equations for the relative velocity after collision along direction normal to plane of contact (to simplify equations, drop time dependence) Rick Parent - CIS 682

Put in terms of the unknown impulse Rick Parent - CIS 682

Put in terms of the unknown impulse Rick Parent - CIS 682

Finally, using user-supplied desired reaction, compute impulse Rick Parent - CIS 682

Finally, using user-supplied desired reaction, compute impulse Rick Parent - CIS 682

Computing Impulse Forces Given: two points of contact and normal of contact Compute velocities

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 Compute j PA += J PB -= J // actually colliding LA += r. A x J LB -= r. B x J Else if Vrelative < -threshold, then resting contact Else they are moving away from each other Rick Parent - CIS 682