- scl.jdg [c+]
[..] La fonction [jdg] ellint1scl
Code
int ellint1_jdg(){
scltracefa(§, ƒ, ∅);
scltracefc("scl-%s (%s) : %s\n\n", sclver(), sclsec(), temps_char(0));
int fn=1001, fi;
double k_1_3=1/3, k_2_3=2/3;
double *phi_rad=newtablin(fn, -π, 3*π);
double *li1_1_3=new double[fn];
double *li1_2_3=new double[fn];
for(fi=0;fi<fn;fi++){
li1_1_3[fi] = ellint1(k_1_3, phi_rad[fi]);
li1_2_3[fi] = ellint1(k_2_3, phi_rad[fi]);
}
scl::string_c imgname=scl::string_c(ƒ)+".svg",
imgpath="./srt/"+imgname;
graf_dis(imgpath.c_str(), fn, phi_rad, li1_1_3,
"curve", fn, phi_rad, li1_2_3, "grid", "on",
"title", "Elliptic integral of 1st kind",
"subtitlex", imgname.c_str(), /*"subtitle", subtitle.c_str(),*/
"linespec", "-l;-q", "linespeca", "-a",
"background-color", "w",
/*"aymin", -1.1, "aymax", 1.1,*/
"legend", "k=1/3;k=2/3", "legcorn", "lra",
"xlabel", "$\\Phi$ [rad]", ∅);
scltracefe(§, ƒ, ∅);
return 0;
}
/* ƒ décorée par
le 25-05-2026 20:58:29 */
Sortie
plot([-pi:0.01:3*pi], ellipticF([-pi:0.01:3*pi],(1/3)^2)); grid on;
hold on;
plot([-pi:0.01:3*pi], ellipticF([-pi:0.01:3*pi],(2/3)^2)); grid on;
axis tight;
[>..\xpl\src\scl.jdg.cpp.ellint1_jdg]
scl-26.05 (gwin64) : 25-05-2026 20:58:30
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<< END OF DISLIN / VERSION 11.3.2 <<
<< Date : 25.05.2026 Time : 20:58:30 Pageformat: DA4L <<
<< Vectors : 3256 Warnings: 0 Fileformat: SVG <<
<< Metafile: ./srt/ellint1_jdg.svg <<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
[<..\xpl\src\scl.jdg.cpp.ellint1_jdg]