computeSupportValueHrep

PURPOSE ^

calculates the support values for a polytope in H-representation

SYNOPSIS ^

function supportValue = computeSupportValueHrep(hrep, pointMatrix)

DESCRIPTION ^

 calculates the support values for a polytope in H-representation 

 Syntax: supportValue = computeSupportValueHrep(hrep, pointMatrix)

 The support function of a polytope P is defined as:
     h(P, x) = [max over all points y in P] y * x'
   where this function might contain multiple points x simultanously. They
   are given in each row of pointMatrix.

 Given an H-representation with the facet normals a(i) and the 
   corresponding distances h(i), it holds:
     h(P, a(i)) = h(i)

 See also: computeFeretHrep, computeProjectionAreaHrep, computeVolumeHrep,
   computeSupportValueVrep, computeFacetAreaHrep

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function supportValue = computeSupportValueHrep(hrep, pointMatrix)
0002 % calculates the support values for a polytope in H-representation
0003 %
0004 % Syntax: supportValue = computeSupportValueHrep(hrep, pointMatrix)
0005 %
0006 % The support function of a polytope P is defined as:
0007 %     h(P, x) = [max over all points y in P] y * x'
0008 %   where this function might contain multiple points x simultanously. They
0009 %   are given in each row of pointMatrix.
0010 %
0011 % Given an H-representation with the facet normals a(i) and the
0012 %   corresponding distances h(i), it holds:
0013 %     h(P, a(i)) = h(i)
0014 %
0015 % See also: computeFeretHrep, computeProjectionAreaHrep, computeVolumeHrep,
0016 %   computeSupportValueVrep, computeFacetAreaHrep
0017 
0018 % The elk-library: convex geometry applied to crystallization modeling.
0019 %   Copyright (C) 2012 Alexander Reinhold
0020 %
0021 % This program is free software: you can redistribute it and/or modify it
0022 %   under the terms of the GNU General Public License as published by the
0023 %   Free Software Foundation, either version 3 of the License, or (at your
0024 %   option) any later version.
0025 %
0026 % This program is distributed in the hope that it will be useful, but
0027 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0028 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0029 %   General Public License for more details.
0030 %
0031 % You should have received a copy of the GNU General Public License along
0032 %   with this program.  If not, see <http://www.gnu.org/licenses/>.
0033 
0034 %% Input handling
0035 if ~exist('zerotol', 'var')
0036     zerotol = elkZerotol;
0037 end
0038 
0039 %% Calculating area
0040 % fall back to computeSupportValueVrep
0041 vrep = convertHrepToVrep(hrep, zerotol);
0042 if ~isempty(vrep.V)
0043     supportValue = computeSupportValueVrep(vrep, pointMatrix);
0044 else
0045     supportValue = 0;
0046 end

Generated on Sat 18-Jul-2015 16:45:31 by m2html © 2005