Plane-Plane Intersection
Does anyone know how to calculate the intersection points of two planes given their plane equations?
-Liquid
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.
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.
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.
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
Edited by - Chris F on June 5, 2000 2:38:23 PM
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
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!
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
Popular Topics
Advertisement