Home > matGeom > geom3d > planeNormal.m

planeNormal

PURPOSE ^

PLANENORMAL Compute the normal to a plane.

SYNOPSIS ^

function n = planeNormal(plane)

DESCRIPTION ^

PLANENORMAL Compute the normal to a plane.

   N = planeNormal(PLANE) 
   compute the normal of the given plane
   PLANE : [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2]
   N : [dx dy dz]
   
   See also
   geom3d, planes3d, createPlane

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function n = planeNormal(plane)
0002 %PLANENORMAL Compute the normal to a plane.
0003 %
0004 %   N = planeNormal(PLANE)
0005 %   compute the normal of the given plane
0006 %   PLANE : [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2]
0007 %   N : [dx dy dz]
0008 %
0009 %   See also
0010 %   geom3d, planes3d, createPlane
0011 %
0012 
0013 %   ---------
0014 %   author : David Legland
0015 %   INRA - TPV URPOI - BIA IMASTE
0016 %   created the 17/02/2005.
0017 %
0018 
0019 %   HISTORY
0020 %   15/04/2013 Extended to N-dim planes by Sven Holcombe
0021 
0022 % plane normal
0023 outSz = size(plane);
0024 outSz(2) = 3;
0025 n = zeros(outSz);
0026 n(:) = crossProduct3d(plane(:,4:6,:), plane(:, 7:9,:));

Generated on Wed 16-Feb-2022 15:10:47 by m2html © 2003-2019