[Scilab-users] Circular contour plot
Samuel Gougeon
sgougeon at free.fr
Sat Apr 30 16:58:00 CEST 2016
Le 29/04/2016 15:35, Jens Simon Strom a écrit :
> Hallo Rafael, your script is perfect, mine isn't. Where is the bug?
in contourd2di() called by contour2d().
As a workaround, you may use:
R=1.; //Radius Erde
a=50;//Abstand Mond - Erde
g0=1; //Schwerebeschleunigung des Mondes im Zentrum der Erde
VLev=[-0.02:0.002:0.02]; //Werte der Äquipotenziallinien-Kandidaten
n=400;//Anzahl der x- und y-Werte
clf
f = gcf();
f.color_map = zeros(100,3); //Colormap
an = linspace(0,2*%pi,400);
x = a+R*sin(an);
y = R*cos(an);
plot(x,y,"-w")
ca=gca();
ca.isoview="on";
p = ca.children(1).children;
p.thickness=4;
p.data(:,3) = 0.1;
x=linspace(a-R,a+R,n);
y=linspace(-R,R,n); //Erdgebiet
[X,Y]=ndgrid(x,y);
V=-g0*(X+a^2../sqrt(X.^2+Y.^2)-2*a);
pos=((X-a).^2+Y.^2 > R^2);
V(pos) = -%inf;
xset("fpf","") //Keine Levelanzeige, Reaktion erst nach dem 2. Lauf
philev=contour2d(x,y,V, VLev)//Plot und dargestellte Äquipotenziallinien
... and report the bug.
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160430/5f083a7c/attachment.htm>
More information about the users
mailing list