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

« back to all changes in this revision

Viewing changes to macros/xdess/fac3d1.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function fac3d1(x,y,z,T,A,leg,flags,ebox)
 
2
//!
 
3
// Copyright INRIA
 
4
[lhs,rhs]=argn(0)
 
5
write(%io(2),'WARNING : fac3d1 is obsolete see plot3d plot3d1 instead');
 
6
if rhs<=0 then  //demo
 
7
  s_mat=['deff(''[x,y,z]=sph(alp,tet)'',[''x=r*cos(alp).*cos(tet)+orig(1)*ones(tet)'';';
 
8
                      '''y=r*cos(alp).*sin(tet)+orig(2)*ones(tet)'';';
 
9
                      '''z=r*sin(alp)+orig(3)*ones(tet)'']);';
 
10
  'r=1;orig=[0 0 0];';
 
11
  '[x1,y1,z1]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));';
 
12
  '[n1,m1]=size(x1);';
 
13
  'r=1/2;orig=[-1 0 0];';
 
14
  '[x2,y2,z2]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));';
 
15
  '[n2,m2]=size(x2);';
 
16
  'x=[x1 x2];y=[y1 y2];z=[z1 z2];';
 
17
  'plot3d1(x,y,z);';]
 
18
  write(%io(2),s_mat);execstr(s_mat);
 
19
  return;end
 
20
select rhs 
 
21
        case 3 then plot3d1(x,y,z) 
 
22
        case 4 then plot3d1(x,y,z,T) 
 
23
        case 5 then plot3d1(x,y,z,T,A) 
 
24
        case 6 then plot3d1(x,y,z,T,A,leg) 
 
25
        case 7 then plot3d1(x,y,z,T,A,leg,flags) 
 
26
        case 8 then plot3d1(x,y,z,T,A,leg,flags,ebox) 
 
27
end