aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <andreas.mueller@ost.ch>2021-09-13 13:08:03 +0200
committerAndreas Müller <andreas.mueller@ost.ch>2021-09-13 13:08:03 +0200
commit3d288f1e437611757ee07c84cc03cd70f216f4c2 (patch)
treed6f111d5bd5dc49bf5c1f12342047e36dfe81382
parentdiv (diff)
downloadSeminarMatrizen-3d288f1e437611757ee07c84cc03cd70f216f4c2.tar.gz
SeminarMatrizen-3d288f1e437611757ee07c84cc03cd70f216f4c2.zip
various cover variants
-rw-r--r--cover/Makefile36
-rw-r--r--cover/back-black.tex27
-rw-r--r--cover/buchcover-black.tex162
-rw-r--r--cover/buchcover.tex5
-rw-r--r--cover/front-black.tex27
-rw-r--r--cover/front.tex2
-rw-r--r--cover/matrix.cpp121
-rw-r--r--cover/matrix.pdfbin170861 -> 22296 bytes
-rw-r--r--cover/matrix.tex29
-rw-r--r--cover/matrix2.tex67
10 files changed, 458 insertions, 18 deletions
diff --git a/cover/Makefile b/cover/Makefile
index dcbe6c6..d0f0780 100644
--- a/cover/Makefile
+++ b/cover/Makefile
@@ -3,23 +3,41 @@
#
# (c) 2018 Prof Dr Andreas Müller, Hochschule Rapperswil
#
-all: matrix.pdf buchcover.png front.pdf back.pdf
+all: matrix.pdf front back
matrix.pdf: matrix.tex
pdflatex matrix.tex
+#matrix2.pdf: matrix2.tex
+# pdflatex matrix2.tex
-buchcover.pdf: buchcover.tex matrix.pdf
+buchcover: buchcover.pdf buchcover-black.pdf
+buchcover.pdf: buchcover.tex matrix-blue.png
pdflatex buchcover.tex
+buchcover-black.pdf: buchcover-black.tex matrix-black.png
+ pdflatex buchcover-black.tex
-buchcover.png: buchcover.pdf
- convert -density 300 -extract 1966x2900+2630+190 buchcover.pdf \
- buchcover.png
-
-nozzle.jpg: nozzle.png
- convert nozzle.png -density 300 -units PixelsPerInch -flop nozzle.jpg
-
+front: front.pdf front-black.pdf
front.pdf: front.tex buchcover.pdf
pdflatex front.tex
+front.png: front.pdf
+ convert front.pdf -density 300 -units PixelsPerInch front.png
+front-black.pdf: front-black.tex buchcover-black.pdf
+ pdflatex front-black.tex
+front-black.png: front-black.pdf
+ convert front-black.pdf -density 300 -units PixelsPerInch front-black.png
+back: back.pdf back-black.pdf
back.pdf: back.tex buchcover.pdf
pdflatex back.tex
+back-black.pdf: back-black.tex buchcover-black.pdf
+ pdflatex back-black.tex
+
+matrix: matrix.cpp
+ g++ -Wall -O2 -g -o matrix `pkg-config --cflags Magick++` matrix.cpp `pkg-config --libs Magick++`
+test: matrix
+ ./matrix -w 500 -h 1080 blubb.png && open blubb.png
+matrix-blue.png: matrix
+ ./matrix -f white -b blue -w 3840 -h 2160 -s 2 matrix-blue.png
+matrix-black.png: matrix
+ ./matrix -b black -w 3840 -h 2160 -s 2 matrix-black.png
+
diff --git a/cover/back-black.tex b/cover/back-black.tex
new file mode 100644
index 0000000..d4aa035
--- /dev/null
+++ b/cover/back-black.tex
@@ -0,0 +1,27 @@
+%
+% front.tex -- template for standalon tikz images
+%
+% (c) 2020 Prof Dr Andreas Müller, Hochschule Rapperswil
+%
+\documentclass[tikz]{standalone}
+\usepackage{amsmath}
+\usepackage{times}
+\usepackage{txfonts}
+\usepackage{pgfplots}
+\usepackage{csvsimple}
+%\usepackage{geometry}
+%\geometry{papersize={170mm,240mm},total={140mm,200mm},top=21mm,bindingoffset=10mm}
+
+\usetikzlibrary{arrows,intersections,math}
+\begin{document}
+\def\skala{1}
+\begin{tikzpicture}[>=latex,thick,scale=\skala]
+
+\begin{scope}
+\clip (1.6,2.1) rectangle (18.6,26.1);
+\includegraphics{buchcover-black.pdf}
+\end{scope}
+
+\end{tikzpicture}
+\end{document}
+
diff --git a/cover/buchcover-black.tex b/cover/buchcover-black.tex
new file mode 100644
index 0000000..81a471e
--- /dev/null
+++ b/cover/buchcover-black.tex
@@ -0,0 +1,162 @@
+%
+% buchcover.tex -- Cover für das Buch Numerik
+%
+% (c) 2018 Prof Dr Andreas Müller, Hochschule Rapperswil
+%
+\documentclass[11pt]{standalone}
+\usepackage{tikz}
+\usepackage{times}
+\usepackage{geometry}
+\usepackage{german}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{times}
+\usepackage{amsmath,amscd}
+\usepackage{amssymb}
+\usepackage{amsfonts}
+\usepackage{txfonts}
+\usepackage{ifthen}
+\usetikzlibrary{math}
+\geometry{papersize={402mm,278mm},total={405mm,278mm},top=72.27pt, bottom=0pt, left=72.27pt, right=0pt}
+\newboolean{guidelines}
+\setboolean{guidelines}{false}
+\setboolean{guidelines}{true}
+
+\definecolor{textfarbe}{rgb}{0.4,1,0.8}
+\definecolor{textfarbe}{rgb}{1,1,1}
+
+\begin{document}
+\begin{tikzpicture}[>=latex, scale=1]
+\tikzmath{
+ real \ruecken, \einschlag, \gelenk, \breite, \hoehe;
+ \ruecken = 3.5;
+ \einschlag = 1.6;
+ \gelenk = 0.8;
+ \breite = 16.7;
+ \hoehe = 24.6;
+ real \bogengreite, \bogenhoehe;
+ \bogenbreite = 2 * (\breite + \einschlag + \gelenk) + \ruecken;
+ \bogenhoehe = 2 * \einschlag + \hoehe;
+}
+
+%\clip (0,0) circle (6);
+
+\draw[fill=black](0,0) rectangle({\bogenbreite},{\bogenhoehe});
+\hsize=13.6cm
+
+\begin{scope}
+\clip (0,0) rectangle({\bogenbreite},{\bogenhoehe});
+%\clip (0,0) rectangle ({\bogenbreite},20.2);
+%\node at (18.7,8.9) [scale=5.0]{\includegraphics{nozzle-hell.jpg}};
+%\node at (18.7,8.9) [scale=5.0]{\includegraphics{nozzle-hell3.jpg}};
+%\node at (18.7,8.9) [scale=5.0]{\includegraphics{nozzle.jpg}};
+%\node at ({\bogenbreite/2},13.0) {\includegraphics[width=42cm]{matrix.pdf}};
+\node at ({\bogenbreite/2},13.0) {\includegraphics[width=42cm]{matrix-black.png}};
+\end{scope}
+
+\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},24.3)
+ [color=textfarbe,scale=1]
+ {\hbox to\hsize{\hfill%
+ \sf \fontsize{24}{24}\selectfont Mathematisches Seminar}};
+
+\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},21.9)
+ [color=textfarbe,scale=1]
+ {\hbox to\hsize{\hfill%
+ \sf \fontsize{50}{50}\selectfont Matrizen}};
+
+\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},19.7)
+ [color=textfarbe,scale=1]
+ {\hbox to\hsize{\hfill%
+ \sf \fontsize{13}{5}\selectfont Andreas Müller und Roy Seitz}};
+
+\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},18.4)
+ [color=textfarbe,scale=1]
+ {\hbox to\hsize{\hfill%
+ \sf \fontsize{13}{5}\selectfont
+ Joshua Bär, % E
+ Marius Baumann, % E
+ Reto Fritsche, % E (2)
+ Alain Keller%, % E
+% Ahmet Güzel%, % E
+ }};
+
+\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},17.75)
+ [color=textfarbe,scale=1]
+ {\hbox to\hsize{\hfill%
+ \sf \fontsize{13}{5}\selectfont
+ Marc Kühne,
+ Robine Luchsinger, % B
+ Naoki Pross, % E
+ Thomas Reichlin%, % B
+ }};
+
+\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},17.1)
+ [color=textfarbe,scale=1]
+ {\hbox to\hsize{\hfill%
+ \sf \fontsize{13}{5}\selectfont
+ Michael Schmid, % MSE
+ Pascal Andreas Schmid, % B
+ Adrian Schuler%,
+ }};
+
+\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},16.45)
+ [color=textfarbe,scale=1]
+ {\hbox to\hsize{\hfill%
+ \sf \fontsize{13}{5}\selectfont
+ Thierry Schwaller, % E
+ Michael Steiner, % E
+ Tim Tönz, % E
+ Fabio Viecelli%, % B
+ }};
+
+\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},15.8)
+ [color=textfarbe,scale=1]
+ {\hbox to\hsize{\hfill%
+ \sf \fontsize{13}{5}\selectfont
+ Lukas Zogg%, % B
+ %
+ }};
+
+\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},15.15)
+ [color=textfarbe,scale=1]
+ {\hbox to\hsize{\hfill%
+ \sf \fontsize{13}{5}\selectfont
+ %Reto Wildhaber% % B
+ }};
+
+%\node at (0,3) [color=white] {\sf \LARGE Mathematisches Seminar 2017};
+
+% Rücken
+\node at ({\bogenbreite/2 + 0.05},20.5) [color=textfarbe,rotate=-90]
+ {\sf\fontsize{35}{0}\selectfont Matrizen};
+
+% Buchrückseite
+\node at ({\einschlag+0.5*\breite},18.6) [color=textfarbe] {\sf
+\fontsize{13}{16}\selectfont
+\vbox{%
+\parindent=0pt
+%\raggedright
+Das Mathematische Seminar der Ostschweizer Fachhochschule
+in Rapperswil hat sich im Frühjahrssemester 2021 dem Thema
+Matrizen zugewandt.
+Ziel war, die vielfältigen Anwendungsmöglichkeiten dieser grundlegenden
+Datenstruktur zu ergründen.
+Dieses Buch bringt das Skript des Vorlesungsteils mit den von den
+Seminarteilnehmern beigetragenen Seminararbeiten zusammen.
+}};
+
+
+\ifthenelse{\boolean{guidelines}}{
+\draw[white] (0,{\einschlag})--({\bogenbreite},{\einschlag});
+\draw[white] (0,{\bogenhoehe-\einschlag})--({\bogenbreite},{\bogenhoehe-\einschlag});
+
+\draw[white] ({\einschlag},0)--({\einschlag},{\bogenhoehe});
+\draw[white] ({\einschlag+\breite},0)--({\einschlag+\breite},{\bogenhoehe});
+\draw[white] ({\einschlag+\breite+\gelenk},0)--({\einschlag+\breite+\gelenk},{\bogenhoehe});
+\draw[white] ({\bogenbreite-\einschlag-\breite-\gelenk},0)--({\bogenbreite-\einschlag-\breite-\gelenk},{\bogenhoehe});
+\draw[white] ({\bogenbreite-\einschlag-\breite},0)--({\bogenbreite-\einschlag-\breite},{\bogenhoehe});
+\draw[white] ({\bogenbreite-\einschlag},0)--({\bogenbreite-\einschlag},{\bogenhoehe});
+}{}
+
+\end{tikzpicture}
+\end{document}
diff --git a/cover/buchcover.tex b/cover/buchcover.tex
index 55c72d1..385f223 100644
--- a/cover/buchcover.tex
+++ b/cover/buchcover.tex
@@ -47,7 +47,8 @@
%\node at (18.7,8.9) [scale=5.0]{\includegraphics{nozzle-hell.jpg}};
%\node at (18.7,8.9) [scale=5.0]{\includegraphics{nozzle-hell3.jpg}};
%\node at (18.7,8.9) [scale=5.0]{\includegraphics{nozzle.jpg}};
-\node at ({\bogenbreite/2},13.0) {\includegraphics[width=42cm]{matrix.pdf}};
+%\node at ({\bogenbreite/2},13.0) {\includegraphics[width=42cm]{matrix.pdf}};
+\node at ({\bogenbreite/2},13.0) {\includegraphics[width=42cm]{matrix-blue.png}};
\end{scope}
\node at ({\einschlag+2*\gelenk+\ruecken+1.5*\breite},24.3)
@@ -69,7 +70,7 @@
[color=white,scale=1]
{\hbox to\hsize{\hfill%
\sf \fontsize{13}{5}\selectfont
- Joshua Baer, % E
+ Joshua Bär, % E
Marius Baumann, % E
Reto Fritsche, % E (2)
Alain Keller%, % E
diff --git a/cover/front-black.tex b/cover/front-black.tex
new file mode 100644
index 0000000..c60e21e
--- /dev/null
+++ b/cover/front-black.tex
@@ -0,0 +1,27 @@
+%
+% front-black.tex -- template for standalon tikz images
+%
+% (c) 2020 Prof Dr Andreas Müller, Hochschule Rapperswil
+%
+\documentclass[tikz]{standalone}
+\usepackage{amsmath}
+\usepackage{times}
+\usepackage{txfonts}
+\usepackage{pgfplots}
+\usepackage{csvsimple}
+%\usepackage{geometry}
+%\geometry{papersize={170mm,240mm},total={140mm,200mm},top=21mm,bindingoffset=10mm}
+
+\usetikzlibrary{arrows,intersections,math}
+\begin{document}
+\def\skala{1}
+\begin{tikzpicture}[>=latex,thick,scale=\skala]
+
+\begin{scope}
+\clip (23.0,2.1) rectangle (40.0,26.1);
+\includegraphics{buchcover-black.pdf}
+\end{scope}
+
+\end{tikzpicture}
+\end{document}
+
diff --git a/cover/front.tex b/cover/front.tex
index f682d48..b2c2c53 100644
--- a/cover/front.tex
+++ b/cover/front.tex
@@ -18,7 +18,7 @@
\begin{tikzpicture}[>=latex,thick,scale=\skala]
\begin{scope}
-\clip (22.4,2.1) rectangle (39.4,26.1);
+\clip (23.0,2.1) rectangle (40.0,26.1);
\includegraphics{buchcover.pdf}
\end{scope}
diff --git a/cover/matrix.cpp b/cover/matrix.cpp
new file mode 100644
index 0000000..431126e
--- /dev/null
+++ b/cover/matrix.cpp
@@ -0,0 +1,121 @@
+/*
+ * matrix.cpp -- create the cover image
+ *
+ * (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+ */
+#include <ImageMagick-7/Magick++.h>
+#include <getopt.h>
+#include <iostream>
+#include <cstdlib>
+#include <cstdio>
+#include <string>
+
+class MatrixImage : public Magick::Image {
+ Magick::ColorRGB _schriftfarbe;
+ double _opacity_fade;
+public:
+ double opacity_fade() const { return _opacity_fade; }
+ void opacity_fade(double of) { _opacity_fade = of; }
+ MatrixImage(Magick::Geometry& geometry, Magick::Color& color,
+ Magick::Color& schriftfarbe)
+ : Magick::Image(geometry, color), _schriftfarbe(schriftfarbe) {
+ _opacity_fade = 0.9;
+ strokeColor(schriftfarbe);
+ fillColor(schriftfarbe);
+ font("Courier");
+ }
+ void verticalline(double x, double scale, double startopacity);
+ void verticallines(double width, double scale, double startopacity);
+};
+
+void MatrixImage::verticalline(double x, double scale, double startopacity) {
+ std::vector<Magick::Drawable> objects_to_draw;
+
+ fontPointsize(20 * scale);
+ double heightstep = 16 * scale;
+
+ double r = (random() % 65525) / 65535.;
+ double initialheight = size().height() * (1 - 0.5 * r);
+ initialheight = heightstep * trunc(initialheight / heightstep);
+ double opacity = startopacity;
+
+ for (int i = 0; i < 20; i++) {
+ objects_to_draw.push_back(Magick::DrawableStrokeOpacity(opacity));
+ objects_to_draw.push_back(Magick::DrawableFillOpacity(opacity));
+ char buffer[2];
+ snprintf(buffer, sizeof(buffer), "%d", random() % 10);
+ objects_to_draw.push_back(Magick::DrawableText(x, initialheight - i * heightstep, buffer));
+ opacity *= opacity_fade();
+ }
+ draw(objects_to_draw);
+}
+
+void MatrixImage::verticallines(double width, double scale, double startopacity) {
+ int xstep = scale * 12;
+ for (int x = 0; x < width; x += xstep) {
+ verticalline(x, scale, startopacity);
+std::cout << x << std::endl;
+ }
+}
+
+struct option longoptions[] = {
+{ "foreground", required_argument, NULL, 'f' },
+{ "background", required_argument, NULL, 'b' },
+{ "opacity", required_argument, NULL, 'o' },
+{ "width", required_argument, NULL, 'w' },
+{ "height", required_argument, NULL, 'h' },
+{ "scale", required_argument, NULL, 's' },
+{ NULL, 0, NULL, 0 }
+};
+
+int main(int argc, char *argv[]) {
+ Magick::InitializeMagick(*argv);
+ int width = 1920;
+ int height = 1080;
+ double opacityfade = 0.9;
+ std::string backgroundcolor("black");
+ std::string foregroundcolor("#66ffcc");
+ int c;
+ int longindex;
+ double scale = 1;
+ while (EOF != (c = getopt_long(argc, argv, "f:b:o:w:h:s:", longoptions, &longindex)))
+ switch (c) {
+ case 'o':
+ opacityfade = std::stod(optarg);
+ break;
+ case 'w':
+ width = std::stoi(optarg);
+ break;
+ case 'h':
+ height = std::stoi(optarg);
+ break;
+ case 's':
+ scale = std::stod(optarg);
+ break;
+ case 'f':
+ foregroundcolor = std::string(optarg);
+ break;
+ case 'b':
+ backgroundcolor = std::string(optarg);
+ break;
+ }
+
+ if (optind >= argc) {
+ std::cerr << "no filename" << std::endl;
+ return EXIT_FAILURE;
+ }
+ std::string filename(argv[optind]);
+
+ Magick::Geometry geometry(width, height);
+ Magick::ColorRGB background(backgroundcolor);
+ Magick::ColorRGB schriftfarbe(foregroundcolor);
+
+ MatrixImage image(geometry, background, schriftfarbe);
+ image.opacity_fade(opacityfade);
+
+ image.verticallines(image.size().width(), 0.5 * scale, 0.25);
+ image.verticallines(image.size().width(), 0.7 * scale, 0.5);
+ image.verticallines(image.size().width(), 1 * scale, 1);
+
+ image.write(filename);
+}
diff --git a/cover/matrix.pdf b/cover/matrix.pdf
index 385e283..51c4c05 100644
--- a/cover/matrix.pdf
+++ b/cover/matrix.pdf
Binary files differ
diff --git a/cover/matrix.tex b/cover/matrix.tex
index 338435b..8952712 100644
--- a/cover/matrix.tex
+++ b/cover/matrix.tex
@@ -22,7 +22,9 @@
\fill[color=blue] (0,{-0.3*\h}) rectangle (\w,{2*\h});
-\def\verticalline#1{
+% #1 = x coordinate
+% #2 = scale factor
+\def\verticalline#1#2{
\pgfmathparse{int(random(0,\h/\vs))*\vs}
\xdef\initialheight{\pgfmathresult}
\foreach \y in {0,\vs,...,\l}{
@@ -30,18 +32,33 @@
\xdef\farbe{\pgfmathresult}
\pgfmathparse{int(random(0,9))}
\xdef\zeichen{\pgfmathresult}
- \node[color=white!\farbe!blue,opacity={(1-\y/\l)}]
+ \node[color=white!\farbe!blue,opacity={(1-\y/\l)},scale=#2]
%\node[color=white!\farbe!blue]
- at (#1,{\initialheight+\y}) {\tt\zeichen};
+ at (#1,{\initialheight+\y*(#2)}) {\tt\zeichen};
+ }
+}
+
+% #1 = width
+% #2 = scalefactor
+\def\verticallines#1#2{
+ \pgfmathparse{int(#1/(#2*\s))}
+ \xdef\xlimit{\pgfmathresult}
+ \foreach \x in {0,1,...,\xlimit}{
+ \pgfmathparse{\x*\s*(#2)}
+ \xdef\X{\pgfmathresult}
+ \verticalline{\X}{#2}
}
}
\begin{scope}
\clip (0,{-0.3*\h}) rectangle (\w,{2*\h});
+\def\W{3}
-\foreach \x in {0,\s,...,\w}{
- \verticalline{\x}
-}
+%\verticallines{\W}{0.5}
+%\verticallines{\W}{0.7}
+\verticallines{\W}{1.0}
+%\verticallines{\W}{1.4}
+%\verticallines{\W}{2}
\end{scope}
diff --git a/cover/matrix2.tex b/cover/matrix2.tex
new file mode 100644
index 0000000..a39b493
--- /dev/null
+++ b/cover/matrix2.tex
@@ -0,0 +1,67 @@
+%
+% matrix.tex -- Hintergrund für Bucheinband
+%
+% (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}
+\begin{document}
+\def\skala{1}
+\begin{tikzpicture}[>=latex,thick,scale=\skala]
+
+\def\w{30}
+\def\h{10}
+\def\l{7}
+\def\s{0.22}
+\def\vs{0.27}
+
+\fill[color=blue] (0,{-0.3*\h}) rectangle (\w,{2*\h});
+
+% #1 = x coordinate
+% #2 = scale factor
+\def\verticalline#1#2{
+ \pgfmathparse{int(random(0,\h/\vs))*\vs}
+ \xdef\initialheight{\pgfmathresult}
+ \foreach \y in {0,\vs,...,\l}{
+ \pgfmathparse{100*(1-(sqrt(\y/\l)))}
+ \xdef\farbe{\pgfmathresult}
+ \pgfmathparse{int(random(0,9))}
+ \xdef\zeichen{\pgfmathresult}
+ \node[color=white!\farbe!blue,opacity={(1-\y/\l)},scale=#2]
+ %\node[color=white!\farbe!blue]
+ at (#1,{\initialheight+\y*(#2)}) {\tt\zeichen};
+ }
+}
+
+% #1 = width
+% #2 = scalefactor
+\def\verticallines#1#2{
+ \pgfmathparse{int(#1/(#2*\s))}
+ \xdef\xlimit{\pgfmathresult}
+ \foreach \x in {0,1,...,\xlimit}{
+ \pgfmathparse{\x*\s*(#2)}
+ \xdef\X{\pgfmathresult}
+ \verticalline{\X}{#2}
+ }
+}
+
+\begin{scope}
+\clip (0,{-0.3*\h}) rectangle (\w,{2*\h});
+\def\W{10}
+
+\verticallines{\W}{0.5}
+\verticallines{\W}{0.7}
+\verticallines{\W}{1.0}
+\verticallines{\W}{1.4}
+\verticallines{\W}{2}
+
+\end{scope}
+
+\end{tikzpicture}
+\end{document}
+