Date: Fri, 19 Apr 1996 14:52:33 +0200 (MET DST)
From: Bernd Kreimeier <Bernd.Kreimeier@NeRo.Uni-Bonn.DE>
Message-Id: <199604191252.OAA12424@marvin.nero.uni-bonn.de>
To: quake-dev@gamers.org
Subject: Re: line intersecting plane...
>From: Olivier Montanuy <montanuy@lsun80.lannion.cnet.fr>
> multiply by the exponent of your personal level in maths.
Well, this is not much of a useful answer, in any sense :-(.
> From: Chris Carollo <carollo.1@osu.edu>
> What is the easiest way to calculate where a line intersects a plane
> (given by two non-colinear vectors)?
You will find a Dr. Dobb's Sourcebook article in the March/April 1996
issue by Michael Abrash (thanks to Derek Nickel for providing the pointer
in first place): "3-D Clipping and Other Thoughts". I will simply quote:
"If we take any point and dot with the plane normal, we'll find out
how far from the origin the point is, as measured along the plane normal.
[..] a simple comparison of the two values [the distance of the plane
to the origin, the projection of the point's vector on the plane's
normal] suffices to tell us which side of the plane the point is on."
Hence the normal + distance representation.
> I'm trying to convert my two-vector plane representation to the normal-
> distance representation...calculating the normal is simple (cross
> product), the distance from the normal to (0,0,0) is screwing with
> me.
You have the vector from the origin to the 1st of your three points
defining the plane. You know that this point is on the plane. A dot
product with your normal will give you the distance from origin to
plane (again: projection of the vector on the normal).
b.
-------------------------------------------------------------------------
"Sharing knowledge makes the world a better place."
-------------------------------------------------------------------------