View Full Version : Please help me with interseciton of planes

Shadow12345

11-21-2002, 11:16 AM

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.

Waldo2k2

11-21-2002, 11:25 AM

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

Shadow12345

11-21-2002, 11:53 AM

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)

Waldo2k2

11-21-2002, 09:57 PM

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

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

Sang-drax

11-22-2002, 06:43 AM

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

Sang-drax

11-22-2002, 07:03 AM

Aha, your version works if you add z=t to your matrices.

Plane 1 : x + 2y - z = 10

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

( 1 2 -1 )

A = ( 2 7 1 )

( 0 0 1 )

( 10 )

B = ( 1 )

( t )

( x )

( y ) = A^-1 * B

( z )

Waldo2k2

11-22-2002, 03:48 PM

>>aha...

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

Powered by vBulletin® Version 4.2.5 Copyright © 2019 vBulletin Solutions Inc. All rights reserved.