"Ian Pereira" <pereirai@rogers.com> wrote in message <i1bqu5$ig2$1@fred.mathworks.com>...
> Does anyone know an efficient algorithm to check if a 3D point lies above or below a plane?
>
> I believe Yamaguchi has an algorithm, but I am not sure if it can be implemented into Matlab efficiently.
>
> Tx.
      
It would depend on what is meant by "above" and "below". On the (almost) spherical earth, what is above a great circle plane and what is below it? Which way is up?
If you consider the zaxis as being the up and down axis, then what would you say about a plane that is orthogonal to the xy plane?
If a plane in an xyz cartesian coordinate system is characterized by the equation
a*x+b*y+c*z+d = 0
then a point with coordinates x, y, and z, lies to one side of the plane in accordance with the sign of a*x+b*y+c*z+d. Positive, it is on one side; negative, it is on the opposite side; and zero, it lies right on the plane. However, which side is which depends on the particular coeffficients selected for a, b, c, and d. If one reverses all their signs, then the above criterion reverses even though the plane is the same.
Roger Stafford
