function ht = tipGap(N, TC, BC, t1, t2)
%UNTITLED5 Summary of this function goes here
%   Detailed explanation goes here
 
% %%%%% !!!!!!ATTENZIONE !!!!!!! IMPONGO ECCENTRICITA GEAR !!!!! 
%  ( DA CAMBIARE ATTENZIONE ) 
xbear = 0.00; ybear = -0.035 ; %no wear, no displ [mm]
%xbear = 0.00; ybear = 0.00 ;

ybear = ybear - BC;

e = sqrt( xbear^2 + ybear^2 );
GAMMA =  rad2deg(mod(atan2(ybear, xbear), 2*pi));

ht_nom = TC*ones(1, N + 1);
tt = t1 + (0:N).*(t2 - t1)/N;
ht = ht_nom - e.*cosd(tt - GAMMA); 

ht = flip(ht);

end