2.0

2.0 | 1 rating Rate this file 17 downloads (last 30 days) File Size: 1.15 KB File ID: #7239

planenormvec

by Yo Fukushima

 

22 Mar 2005 (Updated 24 Mar 2005)

No BSD License  

Calculate the normal vector of a plane in 3D that contains three points.

Download Now | Watch this File

File Information
Description

VEC = PLANENORMVEC(PT1,PT2,PT3) calculats the normal vector of a plane that includes three points PT1, PT2, and PT3. When the plane is expressed as ax + by + cz = 1, VEC(1) = a, VEC(2) = b, VEC(3) = c. Points should be a 1 x 3 vector, specifying x, y and z values for each column.

(Example)
p1 = [3,4,5];
p2 = [8,-4,0];
p3 = [0,0,1];
vec = planenormvec(p1,p2,p3);

MATLAB release MATLAB 5.3.1 (R11.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
04 Dec 2005 Dumb Kid

I tried a simple example of finding normal to the x-y plane using p1(0,0,0) p2(1,0,0) p3(0,1,0). It gives me following error "Three points are badly placed."

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
plane Yo Fukushima 22 Oct 2008 07:44:05
normal Yo Fukushima 22 Oct 2008 07:44:05
vector Yo Fukushima 22 Oct 2008 07:44:05
mathematics Yo Fukushima 22 Oct 2008 07:44:05
general Yo Fukushima 22 Oct 2008 07:44:05
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com