Commit 6d68b073 authored by Mark van Turnhout's avatar Mark van Turnhout
Browse files

updated help for bas_estCylPos

parent 7f43417d
......@@ -15,8 +15,7 @@ function bas_buildFEM(basil,param)
% will run your job/model.
%
% As of yet, the following options (= default) are supported:
% param.basilhome = '~/tue/WillekeBasil/'; root folder for
% <basilid>/<data>
% param.basilhome = bas_getDataRoot; root folder for <basilid>/<data>
% param.seed = 1; mesh seed size [mm]
% param.elOrder = 2; 1: linear elements, 2: quadratic elements (default)
% param.ri = 1.5; indenter radius
......
function [tipNR, Li] = bas_estCylPos(basil, param)
% [tipNR, Li] = bas_estCylPos(basil)
% [tipNR, Li] = bas_estCylPos(basil, param)
%
% tipNR: [indenter tip position;
% Finds a first estimate for the (end) position of the indenter and finds
% the rotation matrix to rotate the indenter to its correct orientation
% from [0, 0, 1] (i.e., from pointing in the positive z-direction).
%
% Note that the indenter-tip estimate is updated by bas_estIndDisp (where
% this script is called/executed).
%
% As of yet, the following parameters are supported:
% param.basilhome = bas_getDataRoot; root folder for <basilid>/<data>
% param.figs = 0; graphical feedback of the indenter fits (1), or not (0,
% default)
% param.flash = 0; use flash data to estimate indenter properties (1), or
% not (0, default)
% param.ithres = 0.2; threshold value to segment indenter
% param.ri = 1.5; indenter radius [mm]
%
% Output:
% tipNR: [indenter tip position estimate;
% indenter rotation matrix]
% written to HD as <param.basilhome>/<basil>/Indenter_tipNR.txt
% written to HD as <param.basilhome>/<basil>/Indenter_tipNR.txt
%
% The indenter rotation matrix rotates the indenter from [0, 0, 1] to the
% determined direction.
% Li: 3D logical (size(slices)) of vertices inside fitted cylinder
% written to HD as <param.basilhome>/<basil>/Indenter_Lc.mat
%
% Li: 3D logical (size(slices)) of vertices inside fitted cylinder
% written to HD as <basil>/Indenter_Lc.mat
% See also, bas_estIndDisp, bas_getDataRoot, bas_prepFEM, bas_buildFEM,
% bas_rebuildFEM
if nargin == 1, param.figs = 0; param.basilhome = bas_getDataRoot; end
if nargin == 1, param.default = 1; end
% set defaults
if ~isfield(param,'figs'), param.figs = 0; end % no figures
if ~isfield(param,'flash'), param.flash = 0; end % else: use flash data
if ~isfield(param,'ithres'), param.ithres = 0.2; end % indenter threshold
if ~isfield(param,'ri'), param.ri = 1.5; end % indenter threshold
if ~isfield(param,'ri'), param.ri = 1.5; end % indenter radius [mm]
if ~isfield(param,'basilhome'), param.basilhome = bas_getDataRoot; end % data root directory
for b = 1:numel(basil)
......@@ -82,7 +99,7 @@ for b = 1:numel(basil)
[V(:,1), V(:,2), V(:,3)] = im2cart(V(:,2), V(:,1), V(:,3), v);
Vc = [X(:) Y(:) Z(:)];
% Delaunay triangulation
DT = DelaunayTri(V);
DT = DelaunayTri(V); %#ok<REMFF1>
% fill convex hull pixels
% logical of vertices inside the covex hull of the indenter
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment