t = linspace(0, 6*pi, 102);


x = cos(t);
y = sin(t);
z = t / (4*pi);


figure(1); clf;
lw = 'linewidth';
plot3(x,y,z, 'k-', lw, 2)
xlabel('x'); ylabel('y'); zlabel('z');
view([110 18])
grid on
hold on

h = plot3(x(1), y(1), z(1), 'r*', lw, 3, 'markersize', 16);
pause
for i=1:length(t)
  set(h,'xdata', x(i), 'ydata', y(i), 'zdata', z(i))
  %pause(0.025)
  drawnow
end

c = 6;
xc = cos(c);
yc = sin(c);
zc = c / (4*pi);
s = linspace(-1, 2, 100);
v1 = -sin(c);
v2 = cos(c);
v3 = 1/(4*pi);
plot3([xc + s*v1], [yc + s*v2], [zc + s*v3], 'b-', lw, 2);
set(h,'xdata', xc, 'ydata', yc, 'zdata', zc)
