tic();

Setangle(30,-65);
Setwindow([-10.5,10.5], [-12.5,8.5]);

function C=C(t);
  C=[(a+b*cos(c*t))*cos(e*t),..
     (a+b*cos(c*t))*sin(e*t),..
     f*sin(g*t)];
endfunction

a=5;
b=3;
c=12;
e=5;
f=1;
g=48;

Curv=Spacecurve('C(t)', 't=[0,2*%pi]', 'N=1000');

//Windisp(Projpara(Curv));

sCurv=Skeletonpara3data(Curv, list(Curv), 3);

//Windisp(Projpara(sCurv));

SetstereoR(20, 30, -65, 7);
Rsk=Skeletonpersdata(Curv, Curv, 3);

SetstereoL(20, 30, -65, 7);
Lsk=Skeletonpersdata(Curv, Curv, 3);

Windisp(Rsk);
Windisp(Lsk);


Openfile('tex/stereo_sample0.tex');
Beginpicture('0.5cm');
Drwline(Projpara(sCurv), 4.0);
Endpicture(0);
Closefile();

Openfile('tex/stereo_sampleL.tex');
Beginpicture('0.5cm');
Drwline(Lsk, 4.0);
Setpen(8);
Drwpt([0,-11]);
Setpen(1);
Endpicture(0);
Closefile();

Openfile('tex/stereo_sampleR.tex');
Beginpicture('0.5cm');
Drwline(Rsk, 4.0);
Setpen(8);
Drwpt([0,-11]);
Setpen(1);
Endpicture(0);
Closefile();

T=toc();
minute=floor(T/60);
second=floor(T-60*minute);
disp(strcat([string(minute), ' minutes ', string(second), ' seconds']));
