File Exchange

image thumbnail

planenormvec

version 1.0 (1.15 KB) by

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

0 Downloads

Updated

View License

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);

Comments and Ratings (2)

Jornney

good~

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."

Updates

1.0

BSD License added.

MATLAB Release
MATLAB 5.3.1 (R11.1)
Acknowledgements

Inspired: threepoints2planez

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today