From db0fcc225416e260284ffa3a1da5919a2b1ac5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Mon, 9 May 2022 11:03:14 +0200 Subject: =?UTF-8?q?Fresnel-Pr=C3=A4sentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vorlesungen/slides/fresnel/eulerspirale.m | 35 +++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'vorlesungen/slides/fresnel/eulerspirale.m') diff --git a/vorlesungen/slides/fresnel/eulerspirale.m b/vorlesungen/slides/fresnel/eulerspirale.m index 312541a..84e3696 100644 --- a/vorlesungen/slides/fresnel/eulerspirale.m +++ b/vorlesungen/slides/fresnel/eulerspirale.m @@ -4,12 +4,15 @@ # (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschlue # global n; -n = 10000; +n = 1000; global tmax; tmax = 10; +global N; +N = round(n*5/tmax); function retval = f(x, t) - retval = [ cos(t*t); sin(t*t) ]; + x = pi * t^2 / 2; + retval = [ cos(x); sin(x) ]; endfunction x0 = [ 0; 0 ]; @@ -23,12 +26,36 @@ fprintf(fn, "\\def\\fresnela{ (0,0)"); for i = (2:n) fprintf(fn, "\n\t-- (%.4f,%.4f)", c(i,1), c(i,2)); end -fprintf(fn, "\n}\n"); +fprintf(fn, "\n}\n\n"); fprintf(fn, "\\def\\fresnelb{ (0,0)"); for i = (2:n) fprintf(fn, "\n\t-- (%.4f,%.4f)", -c(i,1), -c(i,2)); end -fprintf(fn, "\n}\n"); +fprintf(fn, "\n}\n\n"); + +fprintf(fn, "\\def\\Cplotright{ (0,0)"); +for i = (2:N) + fprintf(fn, "\n\t-- ({%.4f*\\dx},{%.4f*\\dy})", t(i), c(i,1)); +end +fprintf(fn, "\n}\n\n"); + +fprintf(fn, "\\def\\Cplotleft{ (0,0)"); +for i = (2:N) + fprintf(fn, "\n\t-- ({%.4f*\\dx},{%.4f*\\dy})", -t(i), -c(i,1)); +end +fprintf(fn, "\n}\n\n"); + +fprintf(fn, "\\def\\Splotright{ (0,0)"); +for i = (2:N) + fprintf(fn, "\n\t-- ({%.4f*\\dx},{%.4f*\\dy})", t(i), c(i,2)); +end +fprintf(fn, "\n}\n\n"); + +fprintf(fn, "\\def\\Splotleft{ (0,0)"); +for i = (2:N) + fprintf(fn, "\n\t-- ({%.4f*\\dx},{%.4f*\\dy})", -t(i), -c(i,2)); +end +fprintf(fn, "\n}\n\n"); fclose(fn); -- cgit v1.2.1