```Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Perpendicular Vector of a plane with a lot of points
Date: Thu, 23 Jun 2011 06:27:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <itumbo\$27s\$1@newscl01ah.mathworks.com>
References: <ituipa\$n3l\$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1308810424 2300 172.30.248.35 (23 Jun 2011 06:27:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 23 Jun 2011 06:27:04 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:733348

"Carlos Junior" <carlosjunior@gmail.com> wrote in message <ituipa\$n3l\$1@newscl01ah.mathworks.com>...
> Hi,
> Please, if anyone could help me I would be very grateful...
>
> I have more than three 3-D points in a plane distribution and I need to know the perpendicular vector of this plane ... In my case, I have 36 points at the 3-D space... They are at the same plane... How could I know the perpendicular vector to this plane using all the points and not only three points ?
>
> Very Thanks.
>
> Carlos
- - - - - - - - -
The answer to your question depends on how much validity is to be attributed to your statement "They are at the same plane".  If this statement is literally and exactly true, then there is absolutely no point in using any more than three of the points to find an orthogonal direction.  Any three which are non-colinear will do.

On the other hand if the points lie only approximately in a plane, then there is suddenly an urgent need to use all of the points to get the best possible answer.

For the exactly planar case, let P, Q, and R be any three (non-colinear) points.  Then cross(Q-P,R-P) is a vector which is orthogonal to the plane of the points.  End of story.

For the approximately planar case, you can make use of the 'mean' and 'svd' functions, but I will hold off until I hear that you are interested in this possibility.

Roger Stafford
```