clear functions;
%clear;
clc;

inc1 = 36;
inc2 = 100;
R = 1/(2*pi);
t = linspace(0,(4/4)*pi,inc1);
zz = linspace(-1.0,1.0,inc2);


for i=1:inc1
  for j=1:inc2
    x(i,j) = R*sin(t(i))*(sin(t(i)+2*pi*zz(j)));
    y(i,j) = R*cos(t(i))*(sin(t(i)+2*pi*zz(j)));
    z(i,j) = zz(j);
  end
end

figure(1)

%a = 0.05;
a = 0.15;
b = 1.0;
ncol = 64;
s = linspace(-1,1,ncol);
map = exp(-0.5*(2*pi*s).^2);
smap = a + map*(b-a);

% yellow and cyan
% colormap([smap zeros(1,ncol); smap smap; zeros(1,ncol) smap]');

% red and green
% colormap([smap zeros(1,ncol);zeros(1,ncol) smap;zeros(1,ncol) zeros(1,ncol)]');

% grayscale
colormap(1-[smap smap; smap smap; smap smap]');

% hold('on')
% plot3(x',y',z','r-');
% plot3(-x'+0.6,y',z','g-');
p3rgbl(x',y',z',[-0.2 0.8],[-0.2 0.2],[-1 1],0,64,1);
hold on
% p3rgbl(-x'+0.6,y',z',[-0.2 0.8],[-0.2 0.2],[-1 1],64,64,0);
p3rgbl(-x'+0.45,y',z',[-0.2 0.8],[-0.2 0.2],[-1 1],64,64,0);


set(gca,'xcolor','black','ycolor','black','zcolor','black');
%set(gcf,'InvertHardCopy','off')
set(gcf,'PaperPosition',[0.2 0.2 8 10.5])

axis_h1 = gca;
set(axis_h1,'pos',[0.1 0.1 0.8 0.8]);
view(0,3)
axis_h2 = axes('pos',[0 0 1 1]);
set(axis_h2,'xcolor','black','ycolor','black','zcolor','black');
