diff --git a/Dockerfile b/.gitea/workflows/Dockerfile similarity index 100% rename from Dockerfile rename to .gitea/workflows/Dockerfile diff --git a/reihen_plot.png b/reihen_plot.png deleted file mode 100644 index 6d544b9..0000000 Binary files a/reihen_plot.png and /dev/null differ diff --git a/reihen_plot.py b/reihen_plot.py deleted file mode 100644 index 5c2d320..0000000 --- a/reihen_plot.py +++ /dev/null @@ -1,17 +0,0 @@ -from matplotlib import pyplot as plt - -f = lambda x_prev: 1/4 * (x - 3) -x = 0 - -reihe = [x] - -for i in range(100): - x = f(x) - reihe.append(x) - -plt.plot(reihe, marker='o', linestyle='-') -plt.title("Reihen Plot") -plt.xlabel("n") -plt.ylabel("x_n") -plt.grid() -plt.savefig("reihen_plot.png", dpi=500) \ No newline at end of file diff --git a/src/Schaltungstheorie/Schaltungstheorie.typ b/src/Schaltungstheorie/Schaltungstheorie.typ index e69de29..169043d 100644 --- a/src/Schaltungstheorie/Schaltungstheorie.typ +++ b/src/Schaltungstheorie/Schaltungstheorie.typ @@ -0,0 +1,208 @@ +#import "../lib/common_rewrite.typ" : * +#import "@preview/mannot:0.3.1" +#import "@preview/zap:0.5.0" + +#show math.equation.where(block: true): it => math.inline(it) + +#set page( + paper: "a4", + margin: ( + bottom: 10mm, + top: 5mm, + left: 5mm, + right: 5mm + ), + flipped:true, + footer: context [ + #grid( + align: center, + columns: (1fr, 1fr, 1fr), + [#align(left, datetime.today().display("[day].[month].[year]"))], + [#align(center, counter(page).display("- 1 -"))], + [#align(right, image("../images/cc0.png", height: 5mm,))] + ) + ], +) + +#let colorAllgemein = color.hsl(105.13deg, 92.13%, 75.1%) +#let colorEineTore = color.hsl(202.05deg, 92.13%, 75.1%) +#let colorZweiTore = color.hsl(235.9deg, 92.13%, 75.1%) +#let colorAnalyseVerfahren = color.hsl(280deg, 92.13%, 75.1%) +#let colorComplexAC = color.hsl(356.92deg, 92.13%, 75.1%) +#let colorMathe = color.hsl(34.87deg, 92.13%, 75.1%) + +#place(top+center, scope: "parent", float: true, heading( + [Schaltungstheorie] +)) + + +#columns(4, gutter: 2mm)[ + #bgBlock(fill: colorEineTore)[ + #subHeading(fill: colorEineTore)[Quelle Wandlung] + + #zap.circuit({ + import zap: * + set-style(scale: (x: 0.75, y:0.75), fill: none) + resistor("R1", (-2, 0), (0, 0)) + vsource("V1", (-2, 0), (-2, -2)) + wire((-2, -2), (0, -2)) + node("n1", (0, 0), label: "1") + node("n2", (0, -2), label: "2") + }) + ] + + #bgBlock(fill: colorAnalyseVerfahren)[ + #subHeading(fill: colorAnalyseVerfahren)[Graphen und Matrizen] + + $bold(i_b)$ (oder $bold(i)$): Zweigstrom-Vektor \ + $bold(u_b)$ (oder $bold(u)$): Zweigspannungs-Vektor \ + $bold(i_m)$ : Maschenstrom-Vektor \ + #text(rgb(20%, 20%, 20%))[(Strom in einer viruellen Masche)] \ + $bold(u_k)$ : Kontenspannungs-Vektor \ + #text(rgb(20%, 20%, 20%))[(Spannung zwischen Referenzknoten und Knoten k)] \ + + #line(length: 100%, stroke: (thickness: 0.2mm)) + + Knotenzidenzmatrix $bold(A)$ + + $bold(A) : bold(i_k) -> text("Knotenstrombianz") = 0$ \ + $bold(A^T) : bold(u_b)-> bold(u_k)$ + $ + bold(A) = quad mannot.mark(mat( + a_11, a_12, ..., a_(1m); + a_21, a_22, ..., a_(2m); + dots.v, dots.v, dots.down, dots.v; + a_(n 1), a_(n 2), ..., a_(n m) + ), tag: #<1>) + + #mannot.annot(<1>, pos:left, text(rgb("#404296"))[#rotate(-90deg)[$<-$ Knoten]], dx: 5mm) + #mannot.annot(<1>, pos:bottom, text(rgb("#404296"))[Zweige $->$], dy: -0.5mm) + + a in {-1, 0, 1} + $ + + #line(length: 100%, stroke: (thickness: 0.2mm)) + + Mascheninsidenz Matrix $bold(B)$\ + + + $bold(B) : bold(u_b) -> text("Zweigspannungsbilanz") = 0$ \ + $bold(B^T) : bold(i_m) -> i_b$ + + $ + bold(B) = quad mannot.mark(mat( + b_11, b_12, ..., b_(1m); + b_21, b_22, ..., b_(2m); + dots.v, dots.v, dots.down, dots.v; + b_(n 1), b_(n 2), ..., b_(n m) + ), tag: #<1>) + + #mannot.annot(<1>, pos:left, text(rgb("#404296"))[#rotate(-90deg)[$<-$ Maschen]], dx: 6mm) + #mannot.annot(<1>, pos:bottom, text(rgb("#404296"))[Zweige $->$], dy: -0.5mm) + + b in {-1, 0, 1} + $ + + #line(length: 100%, stroke: (thickness: 0.2mm)) + + *KCL und KVL* \ + + KCL in Nullraum: $ bold(A) bold(i_b) = bold(0)$ \ + KVL in Bildraum: $ bold(A^T) bold(u_k) = bold(u_b)$ + + KVL in Nullraum: $bold(B) bold(u_b) = bold(0)$ \ + KCL in Bildraum: $bold(B^T) bold(i_m) = bold(i_b)$ \ + + *Tellegen'sche Satz* \ + $bold(A B^T) = bold(B^T A) = 0$ \ + $bold(u_b^T i_b) = 0$ + ] + + #bgBlock(fill: colorAnalyseVerfahren)[ + #subHeading(fill: colorAnalyseVerfahren)[Baumkonzept] + ] + + #bgBlock(fill: colorAnalyseVerfahren)[ + #subHeading(fill: colorAnalyseVerfahren)[Machenstrom-/Knotenpotenzial-Analyse] + ] + + #bgBlock(fill: colorAnalyseVerfahren)[ + #subHeading(fill: colorAnalyseVerfahren)[Reduzierte Knotenpotenzial-Analyse] + ] + + +] + +#pagebreak() +#place(bottom+left, scope: "parent", float: true)[ + #bgBlock(fill: colorZweiTore)[ + #subHeading(fill: colorZweiTore)[Umrechnung Zweitormatrizen] + #show table.cell: it => pad(), + + #table( + columns: (auto, 1fr, 1fr, 1fr, 1fr, 1fr, 1fr), + align: center, + gutter: 0.1mm, + [In $->$], $bold(R)$, $bold(G)$, $bold(H)$, $bold(H')$, $bold(A)$, $bold(A')$, + + $bold(R)$, + $mat(r_11, r_12; r_21, r_22)$, + $1/det(bold(G)) mat(g_22, -g_12; -g_21, g_11)$, + $1/h_22 mat(det(bold(H)), h_12; -h_21, 1)$, + $1/h'_11 mat(1, -h'_12; h'_21, det(bold(H')))$, + $1/a_21 mat(a_11, det(bold(A)); 1, a_22)$, + $1/a'_21 mat(a'_22, 1; det(bold(A')), a'_11)$, + + $bold(G)$, + $1/det(bold(R)) mat(r_22, -r_12; -r_21, r_11)$, + $mat(g_11, g_12; g_21, g_22)$, + $1/h_11 mat(1, -h_12; h_21, det(bold(H)))$, + $1/h'_22 mat(det(bold(H')), h'_12; -h'_21, 1)$, + $1/a_12 mat(a_22, -det(bold(A)); -1, a_11)$, + $1/a'_12 mat(a'_11, -1; -det(bold(A')), a'_22)$, + + $bold(H)$, + $1/r_22 mat(det(bold(R)), r_12; -r_21, 1)$, + $1/g_11 mat(1, -g_12; g_21, det(bold(G)))$, + $mat(h_11, h_12; h_21, h_22)$, + $1/det(bold(H')) mat(h'_22, -h'_12; -h'_21, h'_11)$, + $1/a_22 mat(a_12, det(bold(A)); -1, a_21)$, + $1/a'_11 mat(a'_12, 1; -det(bold(A')), a'_21)$, + + $bold(H')$, + $1/r_11 mat(1, -r_12; r_21, det(bold(R)))$, + $1/g_22 mat(det(bold(G)), g_12; -g_21, 1)$, + $1/det(bold(H)) mat(h_22, -h_12; -h_21, h_11)$, + $mat(h'_11, h'_12; h'_21, h'_22)$, + $1/a_11 mat(a_21, -det(bold(A)); 1, a_12)$, + $1/a'_22 mat(a'_21, -1; det(bold(A')), a'_12)$, + + $bold(A)$, + $1/r_21 mat(r_11, det(bold(R)); 1, r_22)$, + $1/g_21 mat(-g_22, -1; -det(bold(G)), -g_11)$, + $1/h_21 mat(-det(bold(H)), -h_11; -h_22, -1)$, + $1/h'_21 mat(1, h'_22; h'_11, det(bold(H')))$, + $mat(a_11, a_12; a_21, a_22)$, + $1/det(bold(A')) mat(a'_22, a'_12; a'_21, a'_11)$, + + $bold(A')$, + $1/r_12 mat(r_22, det(bold(R)); 1, r_11)$, + $1/g_12 mat(-g_11, -1; -det(bold(G)), -g_22)$, + $1/h_12 mat(1, h_11; h_22, det(bold(H)))$, + $1/h'_12 mat(-det(bold(H')), -h'_22; -h'_11, -1)$, + $1/det(bold(A)) mat(a_22, a_12; a_21, a_11)$, + $mat(a'_11, a'_12; a'_21, a'_22)$, + ) + ] +] + + + + +#place(bottom+left, scope: "parent", float: true)[ + #bgBlock(fill: colorAllgemein, [ + #subHeading(fill: colorAllgemein, [Sin-Table]) + #sinTable + ]) +] + diff --git a/src/analysis1/Analysis1.typ b/src/analysis1/Analysis1.typ index 5370e74..60491cd 100644 --- a/src/analysis1/Analysis1.typ +++ b/src/analysis1/Analysis1.typ @@ -1,4 +1,4 @@ -#import "lib/common_rewrite.typ" : * +#import "../lib/common_rewrite.typ" : * #import "@preview/mannot:0.3.1" #set page( @@ -16,7 +16,7 @@ columns: (1fr, 1fr, 1fr), [#align(left, datetime.today().display("[day].[month].[year]"))], [#align(center, counter(page).display("- 1 -"))], - [#align(right, image("images/cc0.png", height: 5mm,))] + [#align(right, image("../images/cc0.png", height: 5mm,))] ) ], ) @@ -76,32 +76,6 @@ ) ] - #bgBlock(fill: colorAllgemein)[ - #subHeading(fill: colorAllgemein)[Trigonometrie] - ] - - #bgBlock(fill: colorAllgemein)[ - #table( - inset: 1.5mm, - stroke: (thickness: 0.2mm), - columns: 4, - table.header( - [x], [deg], [cos(x)], [sin(x)] - ), - [$0$], [$0°$], [$1$], [$0$], - [$pi/6$], [$30°$], [$sqrt(3)/2$], [$1/2$], - [$pi/4$], [$45°$], [$sqrt(2)/2$], [$sqrt(2)/2$], - [$pi/3$], [$60°$], [$1/2$], [$sqrt(3)/2$], - [$pi/2$], [$90°$], [$0$], [$1$], - [$2/3pi$], [$120°$], [$-1/2$], [$sqrt(3)/2$], - [$3/4pi$], [$135°$], [$-sqrt(2)/2$], [$sqrt(2)/2$], - [$5/6pi$], [$150°$], [$-sqrt(3)/2$], [$1/2$], - [$pi$], [$180°$], [$-1$], [$0$], - [$3/2pi$], [$270°$], [$0$], [$-1$], - [$2pi$], [$360°$], [$1$], [$0$] - ) - ] - #bgBlock(fill: colorAllgemein)[ #subHeading(fill: colorAllgemein)[Complexe Zahlen] $z = r dot e^(phi i) = r (cos(phi) + i sin(phi))$ @@ -500,21 +474,7 @@ #bgBlock(fill: colorAllgemein, [ #subHeading(fill: colorAllgemein, [Sin-Table]) - - #let data = json("sintable.json") - #table( - columns: data.at("x").len() + 1, - rows: data.keys().len(), - stroke: none, - table.hline(stroke: (thickness: 0.3mm)), - fill: (x, y) => if (calc.rem(y, 2) == 0) { color.lighten(colorAllgemein, 10%) } else { white }, - ..for (label) in data.keys() { - ([*#eval(label, mode: "math")*], table.hline(stroke: (thickness: 0.3mm)), ) - for i in data.at(label) { - (eval(i, mode: "math"),) - } - } - ) + #sinTable ]) #pagebreak() diff --git a/src/lib/common_rewrite.typ b/src/lib/common_rewrite.typ index 7c29f45..bbe7e5b 100644 --- a/src/lib/common_rewrite.typ +++ b/src/lib/common_rewrite.typ @@ -25,4 +25,21 @@ #let MathAlignLeft(e) = { align(left, block(e)) -} \ No newline at end of file +} + +#let sinTable = [ + #let data = json("../sintable.json") + #table( + columns: data.at("x").len() + 1, + rows: data.keys().len(), + stroke: none, + table.hline(stroke: (thickness: 0.3mm)), + fill: (x, y) => if (calc.rem(y, 2) == 0) { color.lighten(gray, 50%) } else { white }, + ..for (label) in data.keys() { + ([*#eval(label, mode: "math")*], table.hline(stroke: (thickness: 0.3mm)), ) + for i in data.at(label) { + (eval(i, mode: "math"),) + } + } + ) +] \ No newline at end of file