Home > General-Functions > SUGR > Line_3D > sugr_constrain_3D_Line.m

sugr_constrain_3D_Line

PURPOSE ^

% imposes Plücker constraint for 3D lines

SYNOPSIS ^

function L = sugr_constrain_3D_Line(L)

DESCRIPTION ^

% imposes Plücker constraint for 3D lines
 
 L = sugr_constrain_3D_Line(L) 
 
 Wolfgang Förstner 7/2012
 wfoerstn@uni-bonn.de 

 See also sugr_Line_3D, sugr_minimal_3D_Line, sugr_construct_join_Line_3D

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% imposes Plücker constraint for 3D lines
0002 %
0003 % L = sugr_constrain_3D_Line(L)
0004 %
0005 % Wolfgang Förstner 7/2012
0006 % wfoerstn@uni-bonn.de
0007 %
0008 % See also sugr_Line_3D, sugr_minimal_3D_Line, sugr_construct_join_Line_3D
0009 
0010 function L = sugr_constrain_3D_Line(L)
0011 
0012 % take parts
0013 Lh  = L(1:3);
0014 L0  = L(4:6);
0015 
0016 % possibly distorted directions
0017 Dht = Lh/norm(Lh);
0018 D0t = L0/norm(L0);
0019 
0020 % auxiliary variables
0021 d   = norm(Dht-D0t);
0022 r   = sqrt(1-d^2/4);
0023 
0024 % corrected disrections
0025 Dh  = (1/2 + r/d)*Dht + (1/2-r/d)*D0t;
0026 D0  = (1/2 - r/d)*Dht + (1/2+r/d)*D0t;
0027 
0028 % corrected line parameters
0029 L   = [norm(Lh)*Dh; norm(L0)*D0];
0030 
0031

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