closeCone

PURPOSE ^

compute the closure of the given cone

SYNOPSIS ^

function data = closeCone(data, centerRay)

DESCRIPTION ^

 compute the closure of the given cone

 THIS FUNCTION IS NO USER FUNCTION.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function data = closeCone(data, centerRay)
0002 % compute the closure of the given cone
0003 %
0004 % THIS FUNCTION IS NO USER FUNCTION.
0005 
0006 % The elk-library: convex geometry applied to crystallization modeling.
0007 %   Copyright (C) 2012 Alexander Reinhold
0008 %
0009 % This program is free software: you can redistribute it and/or modify it
0010 %   under the terms of the GNU General Public License as published by the
0011 %   Free Software Foundation, either version 3 of the License, or (at your
0012 %   option) any later version.
0013 %
0014 % This program is distributed in the hope that it will be useful, but
0015 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0016 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0017 %   General Public License for more details.
0018 %
0019 % You should have received a copy of the GNU General Public License along
0020 %   with this program.  If not, see <http://www.gnu.org/licenses/>.
0021 
0022 if isstruct(data) && isfield(data, 'A')
0023     %% hrep
0024     data.A = [data.A; centerRay(:)'];
0025     data.h = [data.h; 1];
0026 elseif isstruct(data) && isfield(data, 'V')
0027     %% vrep
0028     data.V = [data.V; zeros(1, size(data.V, 2))];
0029 elseif isnumeric(data)
0030     %% rayMatrix (vrep without structure)
0031     data = [data; zeros(1, size(data, 2))];
0032 else
0033     error('elk:decompoisition:internalError', 'This should not happen');
0034 end
0035

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