t=pi/2;
p=pi/2;
a=sin(t)*cos(p);
b=sin(t)*sin(p);
c=cos(t);

figure(1)
[fx,fy,fz]=hopfmap(a,b,c);
plot3(fx,fy,fz,'b','LineWidth',2)
axis equal
hold on 
title('Hopf Links for \theta = \pi/2 and \phi=\pm \pi/2')
t=pi/2;
p=3*pi/2;
a=sin(t)*cos(p);
b=sin(t)*sin(p);
c=cos(t);
[fx,fy,fz]=hopfmap(a,b,c);
plot3(fx,fy,fz,'r','LineWidth',2)
pause

t=pi/2;
for k=0:20
    p=pi/2*(1+k/10);
    a=sin(t)*cos(p);
    b=sin(t)*sin(p);
    c=cos(t);
    [fx,fy,fz]=hopfmap(a,b,c);
    plot3(fx,fy,fz,'k','LineWidth',1)
end
hold off
pause

t=0;
p=0;
a=sin(t)*cos(p);
b=sin(t)*sin(p);
c=cos(t);

figure(2)
[fx,fy,fz]=hopfmap(a,b,c);
plot3(fx,fy,fz,'b','LineWidth',2)
axis equal
hold on 


t=pi;
p=0;
a=sin(t)*cos(p);
b=sin(t)*sin(p);
c=cos(t);
[fx,fy,fz]=hopfmap(a,b,c);
plot3(fx,fy,fz,'r','LineWidth',2)

p=0;
for k=0:20
    t=pi*k/20;
    a=sin(t)*cos(p);
    b=sin(t)*sin(p);
    c=cos(t);
    [fx,fy,fz]=hopfmap(a,b,c);
    plot3(fx,fy,fz,'k','LineWidth',1)
end
hold off
title('Hopf Links for \phi = 0 and \theta=0, \pi')
pause

figure(3)
hold on
t=pi/2;
for k=0:20
    p=pi/6*(1+k/10);
    a=sin(t)*cos(p);
    b=sin(t)*sin(p);
    c=cos(t);
    [fx,fy,fz]=hopfmap(a,b,c);
    if k==0 | k==20
        plot3(fx,fy,fz,'k','LineWidth',2)
    else
        plot3(fx,fy,fz,'b','LineWidth',1)
    end
end
hold off
title('Hopf Band')

pause

figure(4)
t=pi/6;
for k=0:40
    p=pi*k/20;
    a=sin(t)*cos(p);
    b=sin(t)*sin(p);
    c=cos(t);
    [fx,fy,fz]=hopfmap(a,b,c);
    plot3(fx,fy,fz,'k','LineWidth',1)
    hold on
end

for k=0:10:40
    p=pi*k/20;
    a=sin(t)*cos(p);
    b=sin(t)*sin(p);
    c=cos(t);
    [fx,fy,fz]=hopfmap(a,b,c);
    plot3(fx,fy,fz,'b','LineWidth',2)
    hold on
end
hold off
title('Hopf Fibration for \theta = \pi/6 and \phi=0, 2\pi')
pause

figure(5)
cc=['k','b','r','y','g'];

N=24;
for k=1:5
    t=k*pi/6;
    if k<3
        j0=N/2;
    else
        j0=N;
    end
for j=-j0:j0;
    p=j*pi/N;
    a=sin(t)*cos(p);
    b=sin(t)*sin(p);
    c=cos(t);
    [fx,fy,fz]=hopfmap(a,b,c);
     plot3(fx,fy,fz,cc(k),'LineWidth',1)
    hold on
end
end
hold off
axis equal
view([-65 15])
title('Hopf Fibration for \theta = k\pi/6')

