Plane-Plane Intersection

Started by
6 comments, last by Liquid 23 years, 10 months ago
Does anyone know how to calculate the intersection points of two planes given their plane equations? -Liquid
Advertisement
Just a little note: the intersection of two planes is a line, not a point.
alexk7
I haven''t consulted a text on this one - I''m maybe guessing here, but how about this:

Get the normal for each plane. You now have 2 vectors. These 2 vectors define a new plane. Get the normal to this plane. The intersection line is parallel to this normal. How you get the point which this line goes through is left to you.

Better yet, consult GRAPHICS GEMS or something.

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
It''s a ray, actually, isn''t it? A line has two end points...
a line segment is two endpoints, and i''m assuming he''s talking about finite planes, because every infinite plane intersects unless they''re parallel along 2 axes.
------------------General Equation, this is Private Function reporting for duty, sir!a2k
I might be wrong here but if you have two plane equations for two planes that cross, then the values of the points where the planes meet must satisfy both equations. Therefore you have to solve a simultaneous equation using the plane equations.

Edited by - Chris F on June 5, 2000 2:38:23 PM
"I have realised that maths can explain everything. How it can is unimportant, I want to know why." -Me
Okay, a little more specific info...what I am trying to do is load MAP files (the kind exported by Q3Radiant). Brushes are defined as sets of intersecting (finite) planes. A brush looks like this:

brushDef
{
( x y z ) ( x y z ) ( x y z ) (( ? ? ? ) ( ? ? ? )) texturename ? ? ?
( more of the above )
( more of the above )
( more of the above )
}

where the first 3 xyz triples are points in the plane. The six question marks in parentheses are floating point numbers, I have no idea what they mean. The remaining three question marks seem to be int''s; don''t know what those are for either. To generate the polygons, you take each plane and clip it against the other planes. I''m stuck on the clipping part. Anyone know any more specifics of the new MAP format (it has changed since QuakeI/II)? Any help is appreciated.

Oh, by the way, yes, I''ve read the tutorial on flipcode. While it was somewhat helpful, there were some bugs in the code (his or mine, I don''t know).

thanks again,

-Liquid
Ahhh. Ok.

First off I would suggest getting the source code to the Q2 tools (or Q3 when released). There you will see how they make the brushes out of the map files. qbsp3 and qe4 (the editor) will be most helpful.

The gist is this: For each plane in a brush, create a face that lies on that plane and is as large as the world will allow ( 8192 in Quake ). Now clip that face against the remaining planes. do this for each face. Ta da!

This topic is closed to new replies.

Advertisement