Original Post
I'm having some real trouble with this, and could use some help...
In this physics demo, I have a number of cubes, and a rope. The rope is attached to the bottom of one of these cubes, and hangs due to gravity.
One of the other cubes is going to move so that one corner of it will touch the rope. Here is where the trouble begins...
I already have knowledge and code to test if a point is on the "bad" side of a plane, and to test if a ray (two connected points) is passing through a plane. What I need is to determine two more things...
1. If I have two planes, how do I define, and how do I find, the ray of intersection between them?
2. If I have three planes, how do I determine the point at which they all intersect?
I need #2 so that I can find the point at which to "bend" the rope... the first two planes would be two edges of the cube, and the third would be coplanar to the ray between the two ends of the rope, and not coplanar to the ray I would find in #1.
Remember that I only track a plane based on it's center and it's normal... to define a cube, I use six planes, and claim that a point is inside the cube if the point is inside all six planes.
I would like more than equations where possible, please... I have yet to be able to turn equations into (C++) code.
[edited by - Wyrframe on July 29, 2002 10:13:55 PM]