%
% Plot Ueberaschung (zur Serie 3, Aufgabe 4b)
%
% T. Mitkova, 24.02.2009

clear all

load PointsSurprise.dat, load NPointsSurprise.dat

X = PointsSurprise(:, 1);
Y = PointsSurprise(:, 2);
N = NPointsSurprise;

counter_temp = 1;

for i = 1 : length(N)
    % Bestimme die Punkte, die durch die i-te Kurve 
    % interpoliert werden sollen
    X_temp = X(counter_temp : counter_temp + N(i) - 1);
    Y_temp = Y( ... );
    
    counter_temp = counter_temp + N(i);
    
    t(1) = 0;
    for k = 2 : N(i)
        t(k) = ... ;
    end

    t_fine = t(1) : 0.01 : t(end);

    sx = spline( ..., ..., ...);
    sy = spline( ..., ..., ...);

    plot(sx, sy, '-'), hold on
    
    X_temp = [];
    Y_temp = [];
    t = [];
end
