Home > General-Functions > Geometry > calc_join_3D_Lines2Plane_finite.m

calc_join_3D_Lines2Plane_finite

PURPOSE ^

% plane parallel to and through midpoint between two 3D-lines L and M

SYNOPSIS ^

function A = calc_join_3D_Lines2Plane_finite(L,M)

DESCRIPTION ^

% plane parallel to and through midpoint between two 3D-lines L and M 
 precondition: lines not parallel, otherwise A = [0 0 0 0]'

 Usage:
   A = calc_join_3D_Lines2Plane_finite(L,M)

   L, M - 6x1 Plücker Lines
   A    - 4x1 plane

 Wolfgang Förstner
 wfoerstn@uni-bonn.de 

 See also calc_intersect_3D_Lines2Point, calc_intersect_3D_Lines2Point_finite
 calc_join_3D_Lines2Plane_finite

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% plane parallel to and through midpoint between two 3D-lines L and M
0002 % precondition: lines not parallel, otherwise A = [0 0 0 0]'
0003 %
0004 % Usage:
0005 %   A = calc_join_3D_Lines2Plane_finite(L,M)
0006 %
0007 %   L, M - 6x1 Plücker Lines
0008 %   A    - 4x1 plane
0009 %
0010 % Wolfgang Förstner
0011 % wfoerstn@uni-bonn.de
0012 %
0013 % See also calc_intersect_3D_Lines2Point, calc_intersect_3D_Lines2Point_finite
0014 % calc_join_3D_Lines2Plane_finite
0015 
0016 function A = calc_join_3D_Lines2Plane_finite(L,M)
0017 
0018 % determine point closest to L and M
0019 X = calc_intersect_3D_Lines2Point_finite(L,M);
0020 
0021 % normal on L and M
0022 N = cross(L(1:3),M(1:3));
0023 
0024 if norm(X) > 10^(-10) && norm(N) > 10^(-10) 
0025     % finite plane
0026     A = [N*X(4); -N'*X(1:3)];
0027 else
0028     % indefinite plane
0029     A = zeros(4,1);
0030 end

Generated on Sat 21-Jul-2018 20:56:10 by m2html © 2005