Home > General-Functions > SUGR > Plane > sugr_Plane.m

sugr_Plane

PURPOSE ^

% Create Plane

SYNOPSIS ^

function Plane = sugr_Plane(a1,a2)

DESCRIPTION ^

% Create Plane

 Usage:

    Plane = sugr_Plane(Ah)
        Ah = 4x1 homogeneous coordinate vector, CovM = 0

    Plane = sugr_Plane(n, d)
        Hessian parameters, CovM = 0
        n = 3x1 normal
        d = 1x1 distance

    Plane = sugr_Plane(Ah,Ahh)
        Ah = 4x1 homogeneous coordinate vector
        Ahh = 4x4 cov.matrx


 Plane = structure
 *           .h    = spherically normalized homogeneous coordinates
 *           .Crr  = reduced covariance matrix of l.h
 *           .type = 5


 Wolfgang Förstner 7/2012
 wfoerstn@uni-bonn.de

 See also sugr_Point_3D, sugr_Line_3D

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Create Plane
0002 %
0003 % Usage:
0004 %
0005 %    Plane = sugr_Plane(Ah)
0006 %        Ah = 4x1 homogeneous coordinate vector, CovM = 0
0007 %
0008 %    Plane = sugr_Plane(n, d)
0009 %        Hessian parameters, CovM = 0
0010 %        n = 3x1 normal
0011 %        d = 1x1 distance
0012 %
0013 %    Plane = sugr_Plane(Ah,Ahh)
0014 %        Ah = 4x1 homogeneous coordinate vector
0015 %        Ahh = 4x4 cov.matrx
0016 %
0017 %
0018 % Plane = structure
0019 % *           .h    = spherically normalized homogeneous coordinates
0020 % *           .Crr  = reduced covariance matrix of l.h
0021 % *           .type = 5
0022 %
0023 %
0024 % Wolfgang Förstner 7/2012
0025 % wfoerstn@uni-bonn.de
0026 %
0027 % See also sugr_Point_3D, sugr_Line_3D
0028 
0029 function Plane = sugr_Plane(a1,a2)
0030 
0031 % default
0032 Chh  = zeros(4);
0033 
0034 
0035 switch nargin
0036     case 1 % 4-vector
0037         %% (1) homogeneous vector, CovM == 0
0038         % minimal representation
0039         Plane   = sugr_minimal_vector(a1,Chh);
0040         
0041     case 2
0042         size_a1=size(a1,1);
0043         switch size_a1
0044             case 3
0045                 %% (2) normal, distance, CovM == 0
0046                 % minimal representation
0047                 Plane   = sugr_minimal_vector([a1;-a2],Chh);
0048                 
0049             case 4
0050                 %% (2) homogeneous coordinate vector
0051                 % minimal representation
0052                 Plane   = sugr_minimal_vector(a1,a2);
0053         end
0054         
0055 end
0056 
0057 Plane.type = 5;

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