%
% CDS_tours.m
%
clc
clear all
close all
%
global c a s_v s_u;
%
s_v = 1;
s_u = sqrt(2);
t_step = 0.05;
view_iter = 500;
%
c = 2;
a = 1;
%
    figure
    
    options = odeset('RelTol',1e-4,'AbsTol',[1e-4 1e-4 1e-4 1e-5 1e-5]);
    y0 = [c 0 0 0 0];
    t1 = 0;
    t2 = t_step;

    Y = ode45(@fun_CDS_tours,[t1 t2],y0,options);
for ii = 1:view_iter
    y1 = Y.y(:,end)';
    sol = [y0(1:3); y1(1:3)];
    plot3(sol(:,1),sol(:,2),sol(:,3));
    hold on
    drawnow
    
    y0 = y1;
    t1 = t2;
    t2 = t1 + t_step;
    Y = ode45(@fun_CDS_tours,[t1 t2],y0,options);
end

%