[Scilab-users] xclick on a Mac
grivet
grivet at cnrs-orleans.fr
Thu Mar 28 16:22:44 CET 2013
Hi,
I have written a small program to illustrate simple electrostatics. The
user is supposed to click (4 times) inside the figure to place a
point charge and then to enter the value of this charge. The program
will then compute and map the electrostatic potential.
clear;
clf();
a = gca(); a.tight_limits = "on";
xsetech(wrect=[0,0,1,1],frect=[-5,-5,5,5],arect = 0.99*[1,1,1,1]);
np = 4; i = 1;
xinfo("clic gauche dans la fenĂȘtre pour placer une charge (4 en tout)");
while i <= np
[ib,xx,yy] = xclick(1);
if abs(xx) < 5 & abs(yy) < 5 & ib==3
xs(i) = xx; ys(i)=yy;
charge(i) = evstr(x_dialog("valeur de la charge: ","1"));
if charge(i) >0 then
plot2d(xs(i),ys(i),style = -4,strf="002")
else
plot2d(xs(i),ys(i),style = -5,strf="002")
end
i = i+1;
end
xinfo("clic gauche dans la fenĂȘtre pour placer une charge (il reste
" + string(5-i)+ " charge(s))");
end
/............potential computation and display.........../
This program performs quite well under WinXP/SP3. However, when run ona
Mac (OS X version 10.7.5
Scilab 5.4.0 ), it stops after the first click; Scilab emits
screen-fulls of Java error messages and warnings.
Can naybody help me run this softaware on the Mac ?
Thank you in advance for your time and help.
JP Grivet
More information about the users
mailing list