function arrow_resize

% Function works with Shim thickness GUI
% Performs the Shim Thickness 3D plot GUI Arrow Scaling and display
% 
% created by Mark Smith
% 121207

% Revised 2/28/08 to accomodate new shim labels, line 15 filename changed.

if evalin('base','thickness') == 0
    msgbox('Thickness Values Not Calculated');
    return
else % If the thicknesses are calculated.
    plot_thickness3D_22808_r1;
    thickness  = evalin('base','thickness');
    shim_centers = evalin('base','shim_centers');
    % Read Slider 1 "scaling" value.
    scaling = get(findobj('tag','sl1'),'Value');
    % Establish the plotted arrow length scale.
    nthk = (thickness/max(thickness));  % Normalize the values.
    % scale thickness vales for displaying arrows.
    nthk=(nthk-.9)*10;
    nthk=nthk.^5;
    %nthk=nthk.^scaling;
    % Create vectors for graphical display of thicknesses.
    for rwc=1:length(shim_centers)
        xx=shim_centers(rwc,1);
        yy=shim_centers(rwc,2);
        zz=shim_centers(rwc,3);
        hold on;
        quiver3(xx,yy,0,0,0,nthk(rwc),'color','k')
        hold on;
    end
    hold off;
end













