makePlottablePolytope

PURPOSE ^

inflate a degenerated and bound an unbounded polytope

SYNOPSIS ^

function [vrep, hrep] = makePlottablePolytope(poly, zerotol, flatness,infinityBoxSize)

DESCRIPTION ^

 inflate a degenerated and bound an unbounded polytope

 Syntax: [vrep, hrep] = makePlottablePolytope(poly, zerotol, ...
                          flatness, infinityBoxSize)

 A V-representation can be flat, but never unbound. A H-representation can
   be unbounded and flat. Both special cases are covered by the functions
   convertHrepToVrep and convertVrepToHrep.

 See also: viewPolytope, convertPolytope, convertVrepToHrep,
   convertHrepToVrep

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [vrep, hrep] = makePlottablePolytope(poly, zerotol, flatness, ...
0002     infinityBoxSize)
0003 % inflate a degenerated and bound an unbounded polytope
0004 %
0005 % Syntax: [vrep, hrep] = makePlottablePolytope(poly, zerotol, ...
0006 %                          flatness, infinityBoxSize)
0007 %
0008 % A V-representation can be flat, but never unbound. A H-representation can
0009 %   be unbounded and flat. Both special cases are covered by the functions
0010 %   convertHrepToVrep and convertVrepToHrep.
0011 %
0012 % See also: viewPolytope, convertPolytope, convertVrepToHrep,
0013 %   convertHrepToVrep
0014 
0015 % The elk-library: convex geometry applied to crystallization modeling.
0016 %   Copyright (C) 2012 Alexander Reinhold
0017 %
0018 % This program is free software: you can redistribute it and/or modify it
0019 %   under the terms of the GNU General Public License as published by the
0020 %   Free Software Foundation, either version 3 of the License, or (at your
0021 %   option) any later version.
0022 %
0023 % This program is distributed in the hope that it will be useful, but
0024 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0025 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0026 %   General Public License for more details.
0027 %
0028 % You should have received a copy of the GNU General Public License along
0029 %   with this program.  If not, see <http://www.gnu.org/licenses/>.
0030 
0031 infoPoly = identifyPolytope(poly);
0032 
0033 switch lower(infoPoly.rep)
0034     case 'hrep'
0035         % infinityBox
0036         vrep = convertHrepToVrep(poly, zerotol, infinityBoxSize);
0037         % inflate
0038         hrep = convertVrepToHrep(vrep, zerotol, flatness);
0039         % get appropriate vrep
0040         vrep = convertHrepToVrep(hrep, zerotol);
0041     case 'vrep'
0042         % inflate
0043         hrep = convertVrepToHrep(poly, zerotol, flatness);
0044         % get appropriate vrep
0045         vrep = convertHrepToVrep(hrep, zerotol);
0046 end

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