


move the polytope in arbitrary representation along a vector Syntax: convertedPoly = movePolytope(poly, v) The vector v must be a vector that matches the dimension of the polytope Vrep. See also: obtainPolytope, stretchPolytope, rotatePolytope


0001 function convertedPoly = movePolytope(poly, v) 0002 % move the polytope in arbitrary representation along a vector 0003 % 0004 % Syntax: convertedPoly = movePolytope(poly, v) 0005 % 0006 % The vector v must be a vector that matches the dimension of the polytope 0007 % Vrep. 0008 % 0009 % See also: obtainPolytope, stretchPolytope, rotatePolytope 0010 0011 % The elk-library: convex geometry applied to crystallization modeling. 0012 % Copyright (C) 2012 Alexander Reinhold 0013 % 0014 % This program is free software: you can redistribute it and/or modify it 0015 % under the terms of the GNU General Public License as published by the 0016 % Free Software Foundation, either version 3 of the License, or (at your 0017 % option) any later version. 0018 % 0019 % This program is distributed in the hope that it will be useful, but 0020 % WITHOUT ANY WARRANTY; without even the implied warranty of 0021 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0022 % General Public License for more details. 0023 % 0024 % You should have received a copy of the GNU General Public License along 0025 % with this program. If not, see <http://www.gnu.org/licenses/>. 0026 0027 %% Input handling 0028 infoInput = identifyPolytope(poly); 0029 0030 %% conversion 0031 if strcmpi(infoInput.rep, 'Vrep') 0032 convertedPoly = moveVrep(poly, v); 0033 else 0034 convertedPoly = moveHrep(poly, v); 0035 end 0036 0037 end