function cornu()
n = [];
for k = 1:2
    n = [n, 1000];
end
omega = cfrac(n)
z(1) = 1+0*i;
for k = 1:100000
    z(k+1) = z(k) + exp(i*omega*pi*k^2);
end
plot(real(z),imag(z))
axis equal

function omega = cfrac(n)
k = length(n)
omega = 1/n(k);
for m = 1:k-1
    omega = 1/(n(k-m)+omega)
end
n