Home > 05-08-Geometry > demo_3D_geometry.m

demo_3D_geometry

PURPOSE ^

% Demo 3D-geometry

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

% Demo 3D-geometry

 Wolfgang Förstner
 wfoerstn@uni-bonn.de

 last changes: Susanne Wenzel 07/17
 wenzel@igg.uni-bonn.de

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Demo 3D-geometry
0002 %
0003 % Wolfgang Förstner
0004 % wfoerstn@uni-bonn.de
0005 %
0006 % last changes: Susanne Wenzel 07/17
0007 % wenzel@igg.uni-bonn.de
0008 
0009 clc
0010 close all
0011 clearvars
0012 
0013 addpath(genpath('../General-Functions'))
0014 
0015 
0016 fprintf('\n------ DEMO 3D projective geometry ------\n')
0017 
0018 fprintf('\nIn order to shorten the output, we display transposed vectors\n')
0019 fprintf('\nGiven: 3D points\n')
0020 X1 = [1,1,2,1]'; disp(['X_1 = [', num2str(X1'),']']);
0021 X2 = [0,2,3,1]'; disp(['X_2 = [', num2str(X2'),']']);
0022 X3 = [0,1,3,1]'; disp(['X_3 = [', num2str(X3'),']']);
0023 X4 = [1,2,3,1]'; disp(['X_4 = [', num2str(X4'),']']);
0024 
0025 fprintf('\nLine L_2 = X_3 ^ X_1 \n')
0026 L2 = calc_Pi(X3)*X1; disp(['L_2 = [', num2str(L2'),']'])
0027 
0028 fprintf('\nPlane A_4 = L_2 ^ X_2 \n')
0029 A4 = calc_Gammadual(L2)*X2; disp(['A_4 = [', num2str(A4'),']'])
0030 
0031 fprintf('\nGiven: Planes\n')
0032 fprintf('A_1 parallel to XY-plane\n')
0033 A1 = [0,0,-1,3]'; disp(['A_1 = [', num2str(A1'),']'])
0034 fprintf('\nA_z = XY-plane\n')
0035 Az=[0,0,1,0]'; disp(['A_z = [', num2str(Az'),']'])
0036 
0037 fprintf('\nIntersection L_iz = A_1 cap A_z\n')
0038 fprintf('\nLine at infinity perpendicular to Z-axis\n')
0039 Linf_z = calc_Pidual(A1)*Az; disp(['Linf_z = [', num2str(Linf_z'),']'])

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