1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2012 - 2016 - Scilab Enterprises
5 // This file is hereby licensed under the terms of the GNU GPL v2.0,
6 // pursuant to article 5.3.4 of the CeCILL v.2.1.
7 // This file was originally licensed under the terms of the CeCILL v2.1,
8 // and continues to be available under such terms.
9 // For more information, see the COPYING file which you should have received
10 // along with this program.
12 function []=fplot3d1(xr,yr,f,theta,alpha,leg,flag,ebox)
13 // Trace la surface d\'efinie par un external f ( ex macro [z]=f(x,y))
14 // on calcule d'abord f sur la grille definie par xr.yr
15 // xr et yr sont des vecteurs implicites donnant les
16 // abscisses et les ordonn\'ees des points de la grille
17 // -theta, alpha : sont les angles en coordonn\'ees spheriques du
18 // point d'observation
19 // -flag et ebox (voir plot3d1)
20 // Exemple : taper fplot3d1() pour voir un exemple
21 // deff('<z>=Surf(x,y)','z=x**2+y**2');
22 // res=fplot3d1(Surf,-1:0.1:1,-1:0.1:1,35,45,"X@Y@Z");
27 if rhs <= 0 then // demo
28 deff("[z]=Surf(x,y)","z=sin(x)*cos(y)");
30 fplot3d1(t,t,Surf,35,45,"X@Y@Z");
35 error(msprintf(gettext("%s: Wrong number of input argument(s): At least %d expected.\n"), "fplot3d1", 3));
39 if exists("theta","local")==1 then opts=[opts,"theta=theta"],end
40 if exists("alpha","local")==1 then opts=[opts,"alpha=alpha"],end
41 if exists("leg" ,"local")==1 then opts=[opts,"leg=leg"] ,end
42 if exists("flag" ,"local")==1 then opts=[opts,"flag=flag"] ,end
43 if exists("ebox" ,"local")==1 then opts=[opts,"ebox=ebox"] ,end
44 if opts==[], opts = ""; end
46 execstr("plot3d1(xr,yr,feval(xr,yr,f),"+strcat(opts,",")+")")