addMinkowskiHrep

PURPOSE ^

calculate the Minkowski sum of two polytopes in H-representation

SYNOPSIS ^

function HrepSum = addMinkowskiHrep(HrepOne, HrepTwo, zerotol)

DESCRIPTION ^

 calculate the Minkowski sum of two polytopes in H-representation

 Syntax: Sum = addMinkowskiHrep(HrepOne, HrepTwo)

 Please consider using addMinkowskiVrep, because Minkowski addition is
   only efficiently performed in V-representation.
 
 See also: convertPolytope, obtainPolytope, addMinkowskiPolytope,
   addMinkowskiVrep

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function HrepSum = addMinkowskiHrep(HrepOne, HrepTwo, zerotol)
0002 % calculate the Minkowski sum of two polytopes in H-representation
0003 %
0004 % Syntax: Sum = addMinkowskiHrep(HrepOne, HrepTwo)
0005 %
0006 % Please consider using addMinkowskiVrep, because Minkowski addition is
0007 %   only efficiently performed in V-representation.
0008 %
0009 % See also: convertPolytope, obtainPolytope, addMinkowskiPolytope,
0010 %   addMinkowskiVrep
0011 
0012 % The elk-library: convex geometry applied to crystallization modeling.
0013 %   Copyright (C) 2012 Alexander Reinhold
0014 %
0015 % This program is free software: you can redistribute it and/or modify it
0016 %   under the terms of the GNU General Public License as published by the
0017 %   Free Software Foundation, either version 3 of the License, or (at your
0018 %   option) any later version.
0019 %
0020 % This program is distributed in the hope that it will be useful, but
0021 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0022 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0023 %   General Public License for more details.
0024 %
0025 % You should have received a copy of the GNU General Public License along
0026 %   with this program.  If not, see <http://www.gnu.org/licenses/>.
0027 
0028 if ~exist('zerotol', 'var')
0029     zerotol = elkZerotol;
0030 end
0031 
0032 VrepOne = convertHrepToVrep(HrepOne, zerotol, inf);
0033 VrepTwo = convertHrepToVrep(HrepTwo, zerotol, inf);
0034 VrepSum = addMinkowskiVrep(VrepOne, VrepTwo);
0035 HrepSum = convertVrepToHrep(VrepSum, zerotol);

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