% Construct 2D line parallel to line l through point x Line_2D = sugr_construct_parallel_lx_Line_2D(l,x) * l = 2D line struct {l.h,l.Crr} * x = 2D point struct {x.h,x.Crr} * Line_2D = 2D line struct {l.h,l.Crr} Wolfgang Förstner 1/2011 wfoerstn@uni-bonn.de See also sugr_Line_2D, sugr_construct_parallel_lO_Line_2D, sugr_construct_midline_Line_2D, sugr_construct_footpoint_Ol_Point_2D, sugr_construct_footpoint_xl_Point_2D, sugr_construct_join_Line_2D, sugr_construct_join_Line_3D
0001 %% Construct 2D line parallel to line l through point x 0002 % 0003 % Line_2D = sugr_construct_parallel_lx_Line_2D(l,x) 0004 % 0005 % * l = 2D line struct {l.h,l.Crr} 0006 % * x = 2D point struct {x.h,x.Crr} 0007 % 0008 % * Line_2D = 2D line struct {l.h,l.Crr} 0009 % 0010 % Wolfgang Förstner 1/2011 0011 % wfoerstn@uni-bonn.de 0012 % 0013 % See also sugr_Line_2D, sugr_construct_parallel_lO_Line_2D, 0014 % sugr_construct_midline_Line_2D, sugr_construct_footpoint_Ol_Point_2D, 0015 % sugr_construct_footpoint_xl_Point_2D, 0016 % sugr_construct_join_Line_2D, sugr_construct_join_Line_3D 0017 0018 function Line_2D = sugr_construct_parallel_lx_Line_2D(l,x) 0019 0020 S3 = calc_S([0,0,1]'); 0021 A = -calc_S(x.h)*S3; 0022 B = calc_S(S3*l.h); 0023 h = A * l.h; 0024 Cxhh = sugr_get_CovM_homogeneous_Vector(x); 0025 Clhh = sugr_get_CovM_homogeneous_Vector(l); 0026 Chh = A * Clhh * A' + B * Cxhh * B'; 0027 0028 % generate line 0029 Line_2D = sugr_Line_2D(h,Chh);