File: plot3d1.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (47 lines) | stat: -rw-r--r-- 1,423 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
plot3d1           Scilab Group           Scilab Function            plot3d1
NAME
   plot3d1 - 3D gray or color level plot of a surface
  
DESCRIPTION
 plot3d1(x,y,z,[theta,alpha,leg,flag,ebox])
 plot3d1(xf,yf,zf,[theta,alpha,leg,flag,ebox])
PARAMETERS
   See plot3d for a full description. There is just a slight difference,
  only the sign of the flag(1)=mode parameter is used: if it is negative
  the grid is not drawn. 
  
DESCRIPTION
   plot3d plots a surface z=f(x,y) with colors depending on the z-level of
  the surface.  Enter the command plot3d1() to see a demo.
  
EXAMPLE
 // simple plot using z=f(x,y)
 t=[0:0.3:2*%pi]'; z=sin(t)*cos(t');
 plot3d1(t,t,z)
 // same plot using facets computed by genfac3d
 [xx,yy,zz]=genfac3d(t,t,z);
 xbasc()
 plot3d1(xx,yy,zz)
 // multiple plots
 xbasc()
 plot3d1([xx xx],[yy yy],[zz 4+zz])
 // simple plot with viewpoint and captions
 xbasc()
 plot3d1(1:10,1:20,10*rand(10,20),35,45,"X@Y@Z",[2,2,3])
 // same plot without grid
 xbasc()
 plot3d1(1:10,1:20,10*rand(10,20),35,45,"X@Y@Z",[-2,2,3])
 // plot of a sphere using facets computed by eval3dp
 deff("[x,y,z]=sph(alp,tet)",["x=r*cos(alp).*cos(tet)+orig(1)*ones(tet)";..
   "y=r*cos(alp).*sin(tet)+orig(2)*ones(tet)";..
   "z=r*sin(alp)+orig(3)*ones(tet)"]);
 r=1; orig=[0 0 0];
 [xx,yy,zz]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));
 xbasc()
 plot3d1(xx,yy,zz)
SEE ALSO
   plot3d
  
AUTHOR
   J.Ph.C.