File: fac3d.sci

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (29 lines) | stat: -rw-r--r-- 990 bytes parent folder | download | duplicates (2)
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
function fac3d(x,y,z,T,A,leg,flags,ebox)
//!
// Copyright INRIA
[lhs,rhs]=argn(0)
write(%io(2),'WARNING : fac3d is obsolete see plot3d plot3d1 instead');
if rhs<=0 then  //demo
  s_mat=['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];';
  '[x1,y1,z1]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));';
  '[n1,m1]=size(x1);';
  'r=1/2;orig=[-1 0 0];';
  '[x2,y2,z2]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));';
  '[n2,m2]=size(x2);';
  'x=[x1 x2];y=[y1 y2];z=[z1 z2];';
  'plot3d(x,y,z);';]
  write(%io(2),s_mat);execstr(s_mat);
  return;end
select rhs 
	case 3 then plot3d(x,y,z) 
	case 4 then plot3d(x,y,z,T) 
	case 5 then plot3d(x,y,z,T,A) 
	case 6 then plot3d(x,y,z,T,A,leg) 
	case 7 then plot3d(x,y,z,T,A,leg,flags) 
	case 8 then plot3d(x,y,z,T,A,leg,flags,ebox) 
end