% Plot uncertain 2D line with standard hyperbola sugr_plot_Line_2D(l,center_type,bound_type,lw,factor,type) * l = geometric element * center_type = type of plotting the element * bound_type = type of plotting the confidence region * lw = linewidth * factor = magnification factor * se = [s,e]' start/end for line segment [0,0]' then line segment (+-sqrt(2)) [1,1]' then line until xlim,ylim (default) Wolfgang Förstner 1/2011 wfoerstn@uni-bonn.de
0001 %% Plot uncertain 2D line with standard hyperbola 0002 % 0003 % sugr_plot_Line_2D(l,center_type,bound_type,lw,factor,type) 0004 % 0005 % * l = geometric element 0006 % * center_type = type of plotting the element 0007 % * bound_type = type of plotting the confidence region 0008 % * lw = linewidth 0009 % * factor = magnification factor 0010 % * se = [s,e]' start/end for line segment 0011 % [0,0]' then line segment (+-sqrt(2)) 0012 % [1,1]' then line until xlim,ylim (default) 0013 % 0014 % Wolfgang Förstner 1/2011 0015 % wfoerstn@uni-bonn.de 0016 % 0017 0018 function sugr_plot_Line_2D(l,center_type,bound_type,lw,factor,se) 0019 0020 if nargin < 6 0021 se=[1,1]; 0022 end 0023 0024 if sugr_get_isfinite_Line_2D(l) % only finite elements 0025 0026 if nargin < 4 0027 lw=2; 0028 end 0029 0030 if nargin < 5 0031 factor=1; 0032 end 0033 0034 Chh = sugr_get_CovM_homogeneous_Vector(l); 0035 C = Chh-l.h*l.h'; 0036 0037 [~,phi,~,~] = sugr_get_centroid_Line_2D(l); 0038 0039 if phi < pi/4 && phi > -3*pi/4 && nargin == 6 0040 se = -se; 0041 end 0042 0043 sugr_plot_conic_explicit(C,center_type,bound_type,lw,factor,se); 0044 0045 end