Dear all,
Scilab contributors and the Scilab team at Dassault Systèmes wish you a happy new year 2024.
Enjoy this year using Scilab!
close(winsid())
clear
f = figure("figure_name", "Happy New Year 2024!!!",...
"icon", "scilab", ...
"background", -1, ...
"resize", "off", ...
"menubar_visible", "off", ...
"toolbar_visible", "off", ...
"dockable", "off", ...
"infobar_visible", "off", ...
"visible", "off");
a = gca();
a.axes_visible = "off";
a.box = "off";
h = uicontrol(f, "style", "text", ...
"string", "HAPPY NEW YEAR", ...
"fontsize", 56, ...
"fontname", "Arial", ...
"fontweight", "bold", ...
"foregroundcolor", [255 210 83]./255, ...
"backgroundcolor", [0 0 0], ...
"position", [50 460-150 510 55]);
Rx0 = 0.118;
Ry0 = 0.18;
x0 = 0.4;
y0 = 0.32;
x = [0.5932946 0.3179501 0.8753286 0.3081147 0.1877272 0.8917584 0.7350354 0.2246151 0.4967680 0.1440353;
0.7595900 0.1052701 0.0558867 0.0639170 0.9662929 0.9788525 0.5996088 0.3736496 0.5287639 0.2900257;
0.4111013 0.3692873 0.6402379 0.3320346 0.9601160 0.9775630 0.1945952 0.7974424 0.1830443 0.0376798;
0.0388763 0.7756652 0.7788295 0.1267752 0.5410308 0.5460528 0.8544896 0.5678065 0.0266508 0.2652666;
0.9539992 0.6886090 0.0584387 0.8277048 0.4042805 0.2608746 0.5821592 0.2677234 0.6120539 0.4478042];
y = [0.0928263 0.9724056 0.1552982 0.6291800 0.9348735 0.9236263 0.7130697 0.3026114 0.6700596 0.6881653;
0.6174309 0.0797014 0.9268582 0.5746158 0.5112389 0.1458858 0.9450817 0.0758407 0.6555424 0.1226937;
0.0394896 0.9157258 0.6103389 0.5611806 0.0361316 0.7189790 0.6724407 0.9552821 0.2451742 0.0427277;
0.3542007 0.3438410 0.0739628 0.8986617 0.8768470 0.4700554 0.6940674 0.0344739 0.6321778 0.4470983;
0.5760625 0.9833479 0.7063643 0.4386602 0.7257925 0.0302416 0.4596148 0.6031628 0.2958698 0.6437188];
for i = 1:5
plot(x(i, :), y(i, :), ".");
e = gce();
e.children.mark_style = 14;
select i
case 1
e.children.mark_style = 14;
e.children.mark_size = 20;
e.children.mark_foreground = color(243, 186, 0);
e.children.mark_background = color(0, 0, 0);
case 2
e.children.mark_style = 14;
e.children.mark_size = 20;
e.children.mark_foreground = color(255, 210, 83);
e.children.mark_background = color(255, 210, 83);
case 3
e.children.mark_style = 14;
e.children.mark_size = 32;
e.children.mark_foreground = color(243, 186, 0);
e.children.mark_background = color(0, 0, 0);
case 4
e.children.mark_style = 14;
e.children.mark_size = 32;
e.children.mark_foreground = color(255, 210, 83);
e.children.mark_background = color(255, 210, 83);
case 5
e.children.mark_style = 10;
e.children.mark_size = 15;
e.children.mark_foreground = color(255, 210, 83);
end
end
xstring(0,0,"2O24");
e = gce();
e.font_size = 22;
e.font_foreground = color(255, 207, 54);
f.visible = "on";
i = 0;
nb = 3000;
a = x0 - Rx0;
b = x0 + Rx0;
c = y0 - Ry0;
d = y0 + Ry0;
xs = a + (b - a) * rand(nb, 1);
ys = c + (d - c) * rand(nb, 1);
test = (xs - x0).^2 ./ Rx0^2 + (ys - y0).^2 ./ Ry0^2 > 1;
xs(test) = [];
ys(test) = [];
nb = length(xs);
plot(xs(1)*ones(nb, 1), ys(1)*ones(nb, 1), "*");
e = gce().children;
e.mark_foreground = color(255, 207, 54);
e.mark_style = 10;
e.mark_size = 10;
for i = 2:nb
e.data(i,:) = [xs(i), ys(i)];
sleep(10^-4)
end