aboutsummaryrefslogtreecommitdiffstats
path: root/buch/papers/nav
diff options
context:
space:
mode:
authorAndreas Müller <andreas.mueller@ost.ch>2022-05-11 22:13:59 +0200
committerAndreas Müller <andreas.mueller@ost.ch>2022-05-11 22:13:59 +0200
commita7a12c313b1a4fb528337eb354668e69d6d20942 (patch)
treef877d331b1054cbcb1216025ec5641b312513ab8 /buch/papers/nav
parentFresnel-Präsentation (diff)
downloadSeminarSpezielleFunktionen-a7a12c313b1a4fb528337eb354668e69d6d20942.tar.gz
SeminarSpezielleFunktionen-a7a12c313b1a4fb528337eb354668e69d6d20942.zip
dreiecksgraphik
Diffstat (limited to 'buch/papers/nav')
-rw-r--r--buch/papers/nav/images/Makefile11
-rw-r--r--buch/papers/nav/images/dreieck.tex68
-rw-r--r--buch/papers/nav/images/macros.tex54
-rw-r--r--buch/papers/nav/images/pk.m55
4 files changed, 188 insertions, 0 deletions
diff --git a/buch/papers/nav/images/Makefile b/buch/papers/nav/images/Makefile
new file mode 100644
index 0000000..a0d7b34
--- /dev/null
+++ b/buch/papers/nav/images/Makefile
@@ -0,0 +1,11 @@
+#
+# Makefile to build images
+#
+# (c) 2022
+#
+
+dreieck.pdf: dreieck.tex dreieckdata.tex macros.tex
+ pdflatex dreieck.tex
+
+dreieckdata.tex: pk.m
+ octave pk.m
diff --git a/buch/papers/nav/images/dreieck.tex b/buch/papers/nav/images/dreieck.tex
new file mode 100644
index 0000000..55f6a81
--- /dev/null
+++ b/buch/papers/nav/images/dreieck.tex
@@ -0,0 +1,68 @@
+%
+% dreieck.tex -- sphärische Dreiecke für Positionsbestimmung
+%
+% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+%
+\documentclass[tikz]{standalone}
+\usepackage{amsmath}
+\usepackage{times}
+\usepackage{txfonts}
+\usepackage{pgfplots}
+\usepackage{csvsimple}
+\usetikzlibrary{arrows,intersections,math,calc}
+\begin{document}
+
+\definecolor{darkgreen}{rgb}{0,0.6,0}
+
+\def\skala{1}
+
+\def\punkt#1#2{
+ \fill[color=#2] #1 circle[radius=0.08];
+}
+
+\begin{tikzpicture}[>=latex,thick,scale=\skala]
+
+\input{dreieckdata.tex}
+\input{macros.tex}
+
+\def\punktbeschriftung{
+ \node at (A) [above] {$A$};
+ \node at (B) [left] {$B$};
+ \node at (C) [right] {$C$};
+ \node at (P) [below] {$P$};
+}
+
+\winkelKappa{gray}
+
+\winkelAlpha{red}
+\winkelGamma{blue}
+\winkelBeta{darkgreen}
+
+\winkelOmega{gray}
+\winkelBetaEins{brown}
+
+\seiteC{black}
+\seiteB{black}
+\seiteA{black}
+
+\seiteL{gray}
+\seitePB{gray}
+\seitePC{gray}
+
+\draw[line width=1.4pt] \kanteAB;
+\draw[line width=1.4pt] \kanteAC;
+\draw[color=gray] \kanteAP;
+\draw[line width=1.4pt] \kanteBC;
+\draw[color=gray] \kanteBP;
+\draw[color=gray] \kanteCP;
+
+\punkt{(A)}{black};
+\punkt{(B)}{black};
+\punkt{(C)}{black};
+\punkt{(P)}{gray};
+
+\punktbeschriftung
+
+\end{tikzpicture}
+\end{document}
+
diff --git a/buch/papers/nav/images/macros.tex b/buch/papers/nav/images/macros.tex
new file mode 100644
index 0000000..69a620d
--- /dev/null
+++ b/buch/papers/nav/images/macros.tex
@@ -0,0 +1,54 @@
+\def\winkelAlpha#1{
+ \begin{scope}
+ \clip (A) circle[radius=1.1];
+ \fill[color=#1!20] \kanteAB -- \kanteCA -- cycle;
+ \end{scope}
+ \node[color=#1] at ($(A)+(222:0.82)$) {$\alpha$};
+}
+
+\def\winkelOmega#1{
+ \begin{scope}
+ \clip (A) circle[radius=0.7];
+ \fill[color=#1!20] \kanteAP -- \kanteCA -- cycle;
+ \end{scope}
+ \node[color=#1] at ($(A)+(285:0.50)$) {$\omega$};
+}
+
+\def\winkelGamma#1{
+ \begin{scope}
+ \clip (C) circle[radius=1.0];
+ \fill[color=#1!20] \kanteCA -- \kanteBC -- cycle;
+ \end{scope}
+ \node[color=#1] at ($(C)+(155:0.60)$) {$\gamma$};
+}
+
+\def\winkelKappa#1{
+ \begin{scope}
+ \clip (B) circle[radius=1.2];
+ \fill[color=#1!20] \kanteBP -- \kanteAB -- cycle;
+ \end{scope}
+ \node[color=#1] at ($(B)+(15:1.00)$) {$\kappa$};
+}
+
+\def\winkelBeta#1{
+ \begin{scope}
+ \clip (B) circle[radius=0.8];
+ \fill[color=#1!20] \kanteBC -- \kanteAB -- cycle;
+ \end{scope}
+ \node[color=#1] at ($(B)+(35:0.40)$) {$\beta$};
+}
+
+\def\winkelBetaEins#1{
+ \begin{scope}
+ \clip (B) circle[radius=0.8];
+ \fill[color=#1!20] \kanteBP -- \kanteCB -- cycle;
+ \end{scope}
+ \node[color=#1] at ($(B)+(330:0.60)$) {$\beta_1$};
+}
+
+\def\seiteC#1{ \node[color=#1] at (-1.9,5.9) {$c$}; }
+\def\seiteB#1{ \node[color=#1] at (3.2,6.5) {$b$}; }
+\def\seiteL#1{ \node[color=#1] at (-0.2,4.5) {$l$}; }
+\def\seiteA#1{ \node[color=#1] at (2,3) {$a$}; }
+\def\seitePB#1{ \node[color=#1] at (-2.1,1) {$p_b$}; }
+\def\seitePC#1{ \node[color=#1] at (2.5,1.5) {$p_c$}; }
diff --git a/buch/papers/nav/images/pk.m b/buch/papers/nav/images/pk.m
new file mode 100644
index 0000000..6e89e9a
--- /dev/null
+++ b/buch/papers/nav/images/pk.m
@@ -0,0 +1,55 @@
+#
+# pk.m -- Punkte und Kanten für sphärisches Dreieck
+#
+# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+#
+
+A = [ 1, 8 ];
+B = [ -3, 3 ];
+C = [ 4, 4 ];
+P = [ 0, 0 ];
+
+global fn;
+fn = fopen("dreieckdata.tex", "w");
+
+fprintf(fn, "\\coordinate (P) at (%.4f,%.4f);\n", P(1,1), P(1,2));
+fprintf(fn, "\\coordinate (A) at (%.4f,%.4f);\n", A(1,1), A(1,2));
+fprintf(fn, "\\coordinate (B) at (%.4f,%.4f);\n", B(1,1), B(1,2));
+fprintf(fn, "\\coordinate (C) at (%.4f,%.4f);\n", C(1,1), C(1,2));
+
+function retval = seite(A, B, l, nameA, nameB)
+ global fn;
+ d = fliplr(B - A);
+ d(1, 2) = -d(1, 2);
+ # Zentrum
+ C = 0.5 * (A + B) + l * d;
+ # Radius:
+ r = hypot(C(1,1)-A(1,1), C(1,2)-A(1,2))
+ # Winkel von
+ winkelvon = atan2(A(1,2)-C(1,2),A(1,1)-C(1,1));
+ # Winkel bis
+ winkelbis = atan2(B(1,2)-C(1,2),B(1,1)-C(1,1));
+ if (abs(winkelvon - winkelbis) > pi)
+ if (winkelbis < winkelvon)
+ winkelbis = winkelbis + 2 * pi
+ else
+ winkelvon = winkelvon + 2 * pi
+ end
+ end
+ # Kurve
+ fprintf(fn, "\\def\\kante%s%s{(%.4f,%.4f) arc (%.5f:%.5f:%.4f)}\n",
+ nameA, nameB,
+ A(1,1), A(1,2), winkelvon * 180 / pi, winkelbis * 180 / pi, r);
+ fprintf(fn, "\\def\\kante%s%s{(%.4f,%.4f) arc (%.5f:%.5f:%.4f)}\n",
+ nameB, nameA,
+ B(1,1), B(1,2), winkelbis * 180 / pi, winkelvon * 180 / pi, r);
+endfunction
+
+seite(A, B, -1, "A", "B");
+seite(A, C, 1, "A", "C");
+seite(A, P, -1, "A", "P");
+seite(B, C, -2, "B", "C");
+seite(B, P, -1, "B", "P");
+seite(C, P, 2, "C", "P");
+
+fclose(fn);