% ODE event
% when the particle fall back onto the disk, stop integration
function [value, isterminal, direction]=fallback_aster(t,zyx)
    global R density
    value=zyx(1)^2+zyx(3)^2+zyx(5)^2-R^2; % when the particle touch the ball surface
    isterminal=1;  % halt integration
    direction=-1;   % zero will be approached from positive direction
    
end