   Finding intersection of 2 planes.
  I''m considering using this method for testing for collisons between polygons:1)Have time-dependent plane eqs for each polygon2)Be able to get the line where the two planes meet at any particular time.3)Detect the time value when this line intersects both polygonsThis should replace doing individual vertex/plane and edge/plane tests.The bit I know I should be able to do from maths classes is find the line whre two planes intersect, but I''ve forgotten it - I keep getting another plane!Point 3 is a line/polygon intersection test in 2d as the line will be in the same plane as both the polygons - this should be simple?I''m presuming that 1) shouldn''t be hard (I think I''m going to ignore angular velocities right now). 
  "I think I''m going to ignore angular velocities right now"Sure else I don''t think explicit timed equations will be simple enough to solve.Then with translations only, this means the normals stay the same. This means the intersecting  line direction is constant. If you express it as :A+D*k, then only A changes. The line can only be defined in two ways - explicit, parametrized : P(k) = A+D*k- implictely as the intersection between two planes.Now how will you judge if the line intersects your polygons ? Well it''s easier with plane equations. You can''t beat the separating plane principle if you test any convex/convex in 3D affine space. Your attempt with line equations is vain to me. I could prove it with the minimal code for each solution. ;  I''m not sure. I recently read up on the separating planes idea & well the principle i simple it seems like there''re too many planes to calculate. One for each face of each body, and also one for the cross product of every pair of edges, one from each body. The version i read was also very mathematical & I got lost before the section on finding time of collision. Whether it''s part of their algorithm or not I have optimisations to get rid of 1/2 the planes in a body thus greatly reducing the number of tests.If you could post a link to a more algorithmically based explanation rather than mathematical paper of the separation plane technique I''d be very grateful.(by convex bodies you mean a body where every vertex can see every other one inside the body right?) ;  before to continue, i'll clarify some things to avoid confusion.When we say planes, we mean mathematical planes, infinite ones. What is in a model is called a face, which is limited.This means, 2 planes have always an intersection exept if they're parrallel. But having the 2 planes intersect doesn't mean at all that 2 faces of a 'model' intersect!quote:1)Have time-dependent plane eqs for each polygonwhat type of time dependance in equations? linear, in x², in x^n, exponential, custom?! Not that easy...quote:2)Be able to get the line where the two planes meet at any particular time.3)Detect the time value when this line intersects both polygonsThat the line intersects the 2 polygons doesn't mean that both polygon intersect, in fact this would be an exception!  If you're trying to make "by geometry" collision detection, i guess you must test each segment to know if it intersects a face (and not a plane! ;-)).Secondly, what's the point of computing "by geometry" collision when you don't even take rotation into account!?Lastly, knowing if something already collided is already difficult to do, predicting it accurately "by geometry" is the hell and needs much much more computations! (or at least i can't imagine how it could be optimized! as opposed to usual collision detection.) It's not a problem if it's for simplistic forms, but it would be very "expensive" if it's for complex models.Can't you simply predict where your body will be and what distance to other bodies it needs to keep?! It would be much easier.(or at least, only a "by bounds" prediction!?)Lastly, if you really need such a prediction method, i recommend to dig deeper in the subject and to prepare yourself for some hard learning. And would recommend you to learn to take time, search & use what others have done. Take your time... cheers    [edited by - misterx on February 15, 2004 11:12:33 AM];  If two polygons intersect then the planes intersect in that region, so the line of intersection between the 2 infinite planes must go through both polygons by definition, right?For time dependence I meant based just on a fixed linear velocity. That just means the normal remains the same but the positioning moves along a stright line. Very easy then, should have seen it. ;quote:Original post by d000hgIf two polygons intersect then the planes intersect in that region, so the line of intersection between the 2 infinite planes must go through both polygons by definition, right?yes, this is exact.but the opposite is not true.if the line of intersection between the 2 infinite planes go through both polygons, it's possible that the polygons intersect, but they can as well be far away.Just imagine 2 crossed square faces viewed from the top:...|--+--...|their respective plane are crossing on the line going through the +, and it is going through both faces. However, one square can be near you while the other is far away!  [edited by - misterX on February 17, 2004 1:20:17 PM]