Does anyone here know how to find the intersection of two planes? I am trying to read a file and the coordinates are derived from the intersection of two triangles that represent a plane.

i.e
(234 432 234) (234 523 275) ( 245 643 236)
(512 768 1024) (123 432 234) (234 456 675)
That is what the format looks like, obviously each line represents a triangle, which represents a plane, and the actual coordinates are derived from where those planes intersect. I have not taken any math that has even touched on this that is why I am asking for someone that may already know how to do this.

2. i know how to solve it using inverse matrices...but the answer is in matrix form...and i don't know how to do matrice calculations for you program (prob use for loops)...try googling is about all i can say...if you want the inverse matrix way just let me know

3. yes I would love the answer using inverse matricies, that is something I can understand. If you want to skip the ascii art and mail a picture or something you can send it to:
letsallthrowrocks@yahoo.com
or you can just post it here i don't care either way

forego explaining exactly what it means, ill figure it out for myself when i have it in front of me, if I have specific questions I'll ask later.

EDIT:
I somewhat understand the equations that are used to represent a plane (I was looking at a shadow casting matrix in one of my books) just to give you an idea of what I already know about this topic (which all in all insn't much)

4. ok lets see, you have x y and z...so i can post some example math equations that you can port over to code.
[algebra]

x+2y-z=10 //note: equations probably don't work out, just an example
2x+4y+z=-1

//you take the coeffecients of the variables into matrix a
1 2 -1
2 4 1
//then take the sums
10
-1
//find the inverse of the first matrix and mulitply it by the second matrix, the resulting matrix will be a set of points for x y an z

[/algebra]

5. Umm, Waldo what do you mean?

You cannot find the inverse of a non-square matrix!

The intersection of two planes is a line.

*With the three points, you can create two vectors in the plane.
*Use these two vectors to find the normal vector (A,B,C)
*With the normal vector and one of the points, create the equation Ax + By + Cz + D = 0 both both planes.
*Solve the equation system

If there's a result, it should be of the form:

{x = x0 + at
{y = y0 + bt
{z = z0 + ct

Plane 1 : x + 2y - z = 10
Plane 2 : 2x + 7y + z = 1

Code:
```    ( 1 2 -1 )
A = ( 2 7 1  )
( 0 0 1  )

( 10 )
B = ( 1  )
( t  )

( x )
( y )  =  A^-1 * B
( z )```

7. >>aha...

i knew it had to work...if not then where the heck has my calculator been getting answers from?? lol