Home > General-Functions > SUGR > Line_2D > sugr_plot_Line_2D.m

sugr_plot_Line_2D

PURPOSE ^

% Plot uncertain 2D line with standard hyperbola

SYNOPSIS ^

function sugr_plot_Line_2D(l,center_type,bound_type,lw,factor,se)

DESCRIPTION ^

% 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

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