aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/110-elliptisch/images/ellipsenumfang.m
blob: 9ac8fe27426dd7f4d4968ac9e1318acb4324f2df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#
# ellipsenumfang
#
# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
#
f = fopen("ekplot.tex", "w");
fprintf(f, "\\def\\ekpath{\n");
fprintf(f, "(0,{\\dy*%.4f})\n", pi / 2);
for epsilon = (1:100) / 100
	[k, e] = ellipke(epsilon^2);
	fprintf(f, "--({\\dx*%.4f},{\\dy*%.4f})\n", epsilon, e);
endfor
fprintf(f, "\n}\n");
fprintf(f, "\\def\\punkte{\n");
for epsilon = (0.05:0.1:0.95)
	[k, e] = ellipke(epsilon^2);
	fprintf(f, "\\fill[color=blue] ({\\dx*%.4f},{\\dy*%.4f}) circle[radius=0.08];\n", epsilon, e);
	fprintf(f, "\\draw[color=blue,line width=0.2pt] ({\\dx*%.4f},{\\dy*%.4f}) -- ({\\dx*%.4f},{\\dy*1.85});\n", epsilon, e, epsilon);
endfor
fprintf(f,"}\n");
fclose(f);