


projection area of a H-polytope Syntax: area = computeProjectionAreaHrep(hrep, dirMatrix) This function calculates a vector of projection areas for all directions in dirMatrix that contains one direction in each row. computeProjectionAreaHrep(..., zerotol) allows to set the tolerance for underlying algorithms (determining flat polytopes; default in elkZerotol). See also: computeProjectionAreaVrep, computeVolumeHrep, computeFacetAreaHrep, computeFeretHrep, computeSupportValueHrep


0001 function area = computeProjectionAreaHrep(hrep, dirMatrix, zerotol) 0002 % projection area of a H-polytope 0003 % 0004 % Syntax: area = computeProjectionAreaHrep(hrep, dirMatrix) 0005 % 0006 % This function calculates a vector of projection areas for all directions 0007 % in dirMatrix that contains one direction in each row. 0008 % 0009 % computeProjectionAreaHrep(..., zerotol) allows to set the tolerance for 0010 % underlying algorithms (determining flat polytopes; default in 0011 % elkZerotol). 0012 % 0013 % See also: computeProjectionAreaVrep, computeVolumeHrep, 0014 % computeFacetAreaHrep, computeFeretHrep, computeSupportValueHrep 0015 0016 % The elk-library: convex geometry applied to crystallization modeling. 0017 % Copyright (C) 2012 Alexander Reinhold 0018 % 0019 % This program is free software: you can redistribute it and/or modify it 0020 % under the terms of the GNU General Public License as published by the 0021 % Free Software Foundation, either version 3 of the License, or (at your 0022 % option) any later version. 0023 % 0024 % This program is distributed in the hope that it will be useful, but 0025 % WITHOUT ANY WARRANTY; without even the implied warranty of 0026 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0027 % General Public License for more details. 0028 % 0029 % You should have received a copy of the GNU General Public License along 0030 % with this program. If not, see <http://www.gnu.org/licenses/>. 0031 0032 %% Input handling 0033 % default zerotol 0034 if ~exist('zerotol', 'var') 0035 zerotol = elkZerotol; 0036 end 0037 0038 %% Calculating area 0039 % fall back to computeProjectionAreaVrep 0040 vrep = convertHrepToVrep(hrep, zerotol); 0041 if ~isempty(vrep.V) 0042 area = computeProjectionAreaVrep(vrep, dirMatrix, zerotol); 0043 else 0044 area = 0; 0045 end