% global unstable manifold of the origin in the Lorenz system s = 10; rh = 28; b = 8/3; % Lorenz system dim = 3; v = @(x) [s*(x(:,2)-x(:,1)) ... rh*x(:,1)-x(:,2)-x(:,1).*x(:,3) ... x(:,1).*x(:,2)-b*x(:,3)]; h = 0.01; n = 10; f = @(x) rk4(v,x,h,n); % flow map n = 20; X1 = linspace(-1,1,n)'; E = ones(size(X1)); X = [ X1 -E -E; X1 -E E; X1 E -E; X1 E E; ... -E X1 -E; -E X1 E; E X1 -E; E X1 E; ... -E -E X1; -E E X1; E -E X1; E E X1]; % sample points c = [0 0 0]; r = [25 25 25]; tree = Tree(c,r); % the box collection %% continuation algorithm newBox = 1; todo = 2; x = [0 0 0]; % equilibrium depth = 21; tree.insert(x'*ones(1,size(X,1))+1E-6*X', depth); while % ... % TODO fprintf('%d boxes\n', n1); clf; boxplot3(tree,'alpha',0.9); axis tight; light('position',[-1,2,2]); view(20,30); drawnow; end %% cleanup delete(tree);