~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to demos/misc/misc.dem

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
mode(-1);
2
 
// Copyright INRIA
3
 
xbasc()
4
 
mode(1)
5
 
ncolor=228;
6
 
// First plot 
7
 
xsetech([0.,0.,0.5,0.5],[-1,1,-1,1]);
8
 
h=hotcolormap(ncolor);
9
 
xset('colormap',h);
10
 
grayplot()
11
 
// Second plot
12
 
xsetech([0.5,0.,0.5,0.5],[-1,1,-1,1]);
13
 
h1=((1:ncolor)'/ncolor)*[1 0 0];
14
 
xset('colormap',h1);
15
 
plot3d1()
16
 
// Third plot
17
 
xsetech([0.,0.5,0.5,0.5],[-1,1,-1,1]);
18
 
h2=graycolormap(ncolor);
19
 
xset('colormap',h2);
20
 
grayplot()
21
 
// Fourth plot
22
 
xsetech([0.5,0.5,0.5,0.5],[-1,1,-1,1]);
23
 
deff('[x,y,z]=knot(u,v)',['vv=ones(v)';'uu=ones(u);';
24
 
    'x=(5.*cos(u)+cos(u).*cos(v))';
25
 
    'y=(5.*sin(u)+sin(u).*cos(v))';
26
 
    'z=(uu.*sin(v))';])
27
 
nx=60;Nx=(0:nx)/nx ;ny=20;Ny=(0:ny)/ny;
28
 
[xx,yy,zz]=eval3dp(knot,2*%pi*Nx,2*%pi*Ny);
29
 
XXX=[-xx xx];YYY=[-yy zz];ZZZ=[-zz yy];
30
 
kk1=[1:size(zz,2)];
31
 
 
32
 
ncolor=60;
33
 
hh=hotcolormap(ncolor);
34
 
xset('colormap',hh) ;
35
 
kk1=modulo(kk1,60);kk2=kk1;
36
 
KKK=list(ZZZ,[kk1 kk2]);
37
 
plot3d(XXX,YYY,KKK,35,70," @ @ ",[2,1,4],[-6,6,-6,6,-6,6]);
38
 
 
39
 
 
40
 
// Change the window colormap
41
 
xpause(2.d6)
42
 
xset('colormap',h);
43
 
xbasr(xget('window'))
44
 
xpause(2d6)
45
 
xset('colormap',h1);
46
 
xbasr(xget('window'))
47
 
xpause(2d6)
48
 
xset('colormap',h2);
49
 
xbasr(xget('window'))
50
 
xpause(2d6)
51
 
xset('colormap',hh) ;
52
 
xbasr(xget('window'))
53
 
xset('default');
54
 
xsetech([0 0 1 1])