I've built quite a decent ragdoll engine, but I'm stumped as to how to solve collisions between the lines (or constraints) that join points (for instance, one ragdoll colliding with another). I was able to work out on paper how to find the point of intersection of two lines, then modify the velocities of the penetrating point so as to remove it within one update, but I couldn't get it to translate into flash.

In short, can someone explain to me how to, in flash
-Find the point of intersection between two line segments (line segments defined as {a.x, a.y, b.x, b.y}
-Find the component vectors required to move the two lines apart

Thanks in advance (: