I am designing a 2d physics engine that uses Verlet integration for moving points (velocities mentioned below can be derived), constraints to represent moving line segments, and continuous collision detection to resolve collisions between moving points and static lines, and collisions between moving/static points and moving lines.

I already know how to calculate the Time of Impact for both types of collision events, and how to resolve moving point static line collisions. However, I can't figure out how to resolve moving/static point moving line collisions.

Here are the initial conditions in a point and moving line collision event. We have a line segment joined by two points, A and B. At this instant, point P is touching/colliding with line AB. These points have unit mass and some might have an initial velocity, unless point P is static. The line is massless and has no explicit rotational component, since points A and B could freely move around, extending or contracting the line as a result (which will be fixed later by the constraint solver). Collision is inelastic.

What are the final velocities of the points after collision?

  • \$\begingroup\$ So you know how to compute the TOI for a moving point and a moving line? If yes, then where are you getting stuck? If you can compute the TOI, you can compute the point and line impact velocities and derive responses from those.. one big problem would be if your lines and points do not have linear trajectories inbetween time steps. \$\endgroup\$ – teodron Aug 8 '13 at 8:49

Usually you can treat moving/moving intersections as though one of them is stationary and the other is moving with the sum of the two velocities.

Somewhere on the line segment is a collision point that you can determine. That point's velocity is an interpolation of A & B velocities. Now you can treat the line segment as static and sum P velocity to the collision Point velocity and treat it as if P was traveling at the summed velocity.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.