- scl.jdg [c+]
[..] La fonction [jdg] ellint2scl
Code
int ellint2_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 *li2_1_3=new double[fn];
double *li2_2_3=new double[fn];
for(fi=0;fi<fn;fi++){
li2_1_3[fi] = ellint2(k_1_3, phi_rad[fi]);
li2_2_3[fi] = ellint2(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, li2_1_3,
"curve", fn, phi_rad, li2_2_3, "grid", "on",
"title", "Elliptic integral of 2nd 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 19:37:52 */
Sortie
plot([-pi:0.01:3*pi], ellipticE([-pi:0.01:3*pi],(1/3)^2)); grid on;
hold on;
plot([-pi:0.01:3*pi], ellipticE([-pi:0.01:3*pi],(2/3)^2)); grid on;
axis tight;
[>..\xpl\src\scl.jdg.cpp.ellint2_jdg]
scl-26.05 (gwin64) : 25-05-2026 19:37:52
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<< END OF DISLIN / VERSION 11.3.2 <<
<< Date : 25.05.2026 Time : 19:37:53 Pageformat: DA4L <<
<< Vectors : 3153 Warnings: 0 Fileformat: SVG <<
<< Metafile: ./srt/ellint2_jdg.svg <<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
[<..\xpl\src\scl.jdg.cpp.ellint2_jdg]