Skip to main content
gamedev.net
🔒 Locked

Impossible?

Started by Tim Cowley Mar 24, 2004 at 9:15 PM 2 replies 750+ views
Original Post
Tim Cowley
Tim Cowley
Is there a swept-volume algorithm that deals with moving and rotating 2D lines colliding? Or is this impossible?
jimmynelson
jimmynelson
I am not sure but I don''t it is impossible. If you visualize stuff like this you usually can break it down.

Ok rather than dragging it out I will give you my assumption.

- You probably use the velocity and angular velocity on its endpoints to create 2 curves.

- From those curves you fine its closest point to the stationary line.

- From those closest points you find at which instance the line will be at each curve point (you must find the instance in time the line was there during rotation and movement and not make just a line from the 2 points closest points on the curve).

- So now you have 2 new lines made from the moving line. You test those against the stationary line, depending on the earliest instance in time, you have your earliest collision.

- Also for a fail safe you could test 2 overlaps, one at the beginning of movement and one at the end.

Once again this is just an assumption... seems reasonable.
oliii
oliii
it must be possible, it''s been done in 3D with triangles. search for Stephane Redon''s thesis. He is doing swept test between meshes under rotation and translation. it involves finding the roots of a quadric equation (I think). basically, if the lines are rotating and translating at constant speed other a time frame (that''s an assumption made by most collision detection algorithms), you can put the motions into an equation, and solve it.


http://www-rocq.inria.fr/~redon/research.htm

http://www-rocq.inria.fr/~redon/papers/eg2002.pdf



Everything is better with Metal.
Tim Cowley
Tim Cowley
Awesome, thanks guys.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.