Home > 10-Uncertain-Geometry > demo_Point_3D.m

demo_Point_3D

PURPOSE ^

demo_Point_3D: test routine for generating 3D point

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 demo_Point_3D: test routine for generating 3D point

 Point_3D = structure 

 *           .h = spherically normalized homogeneous coordinates
 *           .Crr = half vector of reduced covariance matrix
 *           .type = 'Point_2D'


 Wolfgang Förstner
 wfoerstn@uni-bonn.de

 See also sugr_Point_3D

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % demo_Point_3D: test routine for generating 3D point
0002 %
0003 % Point_3D = structure
0004 %
0005 % *           .h = spherically normalized homogeneous coordinates
0006 % *           .Crr = half vector of reduced covariance matrix
0007 % *           .type = 'Point_2D'
0008 %
0009 %
0010 % Wolfgang Förstner
0011 % wfoerstn@uni-bonn.de
0012 %
0013 % See also sugr_Point_3D
0014 
0015 clearvars
0016 clc
0017 
0018 %% initialize sugr
0019 %
0020 addpath(genpath('../General-Functions/'));
0021 sugr_INIT
0022 
0023 %% Sorted according to number of arguments
0024 
0025 %% (1) Euclidean point vector without CovM (==0)
0026 Xe = [1,2,3]';
0027 X = sugr_Point_3D(Xe);
0028 sugr_show_Point_3D(X,'X');
0029 
0030 %% (1) Homogeneous point vector without CovM (==0)
0031 Xh = [1,2,3,2]';
0032 X = sugr_Point_3D(Xh);
0033 sugr_show_Point_3D(X,'X');
0034 
0035 %% (2) Homogeneous point vector with CovM
0036 Xh = [1,2,3,2]';
0037 Chh = [3,2,1,0;2,3,2,1;1,2,3,2;0,1,2,3]*0.1;
0038 X = sugr_Point_3D(Xh,Chh);
0039 sugr_show_Point_3D(X,'X');
0040 
0041 %% (2) Homogeneous vanishing point vector
0042 Xh = [3,4,2,0]';
0043 Chh = [3,2,1,0;2,3,2,1;1,2,3,2;0,1,2,3]*0.1;
0044 X = sugr_Point_3D(Xh,Chh);
0045 sugr_show_Point_3D(X,'X');
0046 
0047 %% (6) Euclidean point coordinates with with standard dev
0048 x = 1;
0049 y = 2;
0050 z = 3;
0051 sx = 0.1;
0052 sy = 0.3;
0053 sz = 0.2;
0054 X=sugr_Point_3D(x,y,z,sx,sy,sz);
0055 sugr_show_Point_3D(X,'X');
0056

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