next up previous
Next: n-pendulum Up: Graphics Previous: Bezier surface test 2

Subplots

ncolor=228;
// First plot
xsetech([0.,0.,0.5,0.5],[-1,1,-1,1]);
h=hotcolormap(ncolor);
xset('colormap',h);
t=-%pi:0.1:%pi;m=sin(t)'*cos(t);grayplot(t,t,m);
// Second plot
xsetech([0.5,0.,0.5,0.5],[-1,1,-1,1]);
h1=((1:ncolor)'/ncolor)*[1 0 0];
xset('colormap',h1);
t=-%pi:0.3:%pi;plot3d1(t,t,sin(t)'*cos(t),35,45,'X@Y@Z',[2,2,4]);

// Third plot
xsetech([0.,0.5,0.5,0.5],[-1,1,-1,1]);
h2=graycolormap(ncolor);
xset('colormap',h2);
t=-%pi:0.1:%pi;m=sin(t)'*cos(t);grayplot(t,t,m);

// Fourth plot
xsetech([0.5,0.5,0.5,0.5],[-1,1,-1,1]);
deff('[x,y,z]=knot(u,v)',['vv=ones(v)';'uu=ones(u);';
    'x=(5.*cos(u)+cos(u).*cos(v))';
    'y=(5.*sin(u)+sin(u).*cos(v))';
    'z=(uu.*sin(v))';])
nx=60;Nx=(0:nx)/nx ;ny=20;Ny=(0:ny)/ny;
[xx,yy,zz]=eval3dp(knot,2*%pi*Nx,2*%pi*Ny);
XXX=[-xx xx];YYY=[-yy zz];ZZZ=[-zz yy];
kk1=[1:size(zz,2)];
ncolor=60;
hh=hotcolormap(ncolor);
xset('colormap',hh) ;
kk1=modulo(kk1,60);kk2=kk1;
KKK=list(ZZZ,[kk1 kk2]);
plot3d(XXX,YYY,KKK,35,70," @ @ ",[2,1,4],[-6,6,-6,6,-6,6]);
\fbox{\epsfig{file=foo0_60.eps,width=3.75in}}

Scilab group