...
 
Commits (3)
......@@ -4,6 +4,7 @@
!.vscode/tasks.json
bin/
obj/
__pycache__
*.vcxproj.user
*.spv
......
......@@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.5)
project(Raytracing VERSION 1.0.2 LANGUAGES CXX)
project(Raytracing VERSION 1.1.0 LANGUAGES CXX)
cmake_policy(SET CMP0048 NEW)
#------------------------------------------------------------------------------------------------------------------
......
# Forschungsprokect Raytracing mit Vulkan
# Masterarbeit Godrays mittels Raytracing
Forschungspraktikum bei der Professur GDV (Graphische Datenverarbeitung) an der TU-Chemnitz.
Masterarbeit bei der Professur GDV (Graphische Datenverarbeitung) an der TU-Chemnitz.
## Zielsetzung
Das Erarbeiten einer Anwendung, die eine einfache Szene mittels Raytracing rendern kann. Die Raytracing-Shader sollen dabei im laufenden Programm angepasst und neu geladen werden können, um das Herumspielen mit verschiedenen Konfigurationen zu ermöglichen.
Das Darstellen von Strahlenbüscheln (a.k.a) Godrays soll mittels Raytracing umgesetzt werden um so eine höhere
Qualität als mit bisherigen Ansätzen zu erreichen.
## Voraussetzungen
- Git
- Python
- Python 3.x
- cmake 3.5 oder neuer
- Installiertes Vulkan-SDK von [LunarG](https://vulkan.lunarg.com) in der Version 1.1.130.0 oder neuer (alte Versionen sind nicht erprobt, können aber auch funktionieren)
- Belibige CMake-kompatible Buildtools, z.B. Visual Studio, oder gnu make
- Installiertes Vulkan-SDK von [LunarG](https://vulkan.lunarg.com) in der Version 1.2.141.0 oder neuer (andere Versionen sind nicht erprobt, können aber auch funktionieren)
- Beliebige CMake-kompatible Buildtools, z.B. Visual Studio, oder gnu make
## Initialisierung
......@@ -23,11 +24,14 @@ Das Erarbeiten einer Anwendung, die eine einfache Szene mittels Raytracing rende
- [Assimp](https://github.com/assimp/assimp) -> `src/submodules/assimp`
- [glm](https://github.com/g-truc/glm) -> `src/submodules/glm`
- [shaderc (known good-branch)](https://github.com/google/shaderc/tree/known-good) -> `src/submodules/shaderc`
3. Skript `src/submodules/shaderc/update_shaderc_sources.py` ausführen um die Abhänigkeiten von `libshaderc` herunterzuladen.
- [Dear ImGui](https://github.com/ocornut/imgui) -> `src/submodules/dearImGui`
- [stb](https://github.com/nothings/stb) -> `src/submodules/stb`
3. Skript `src/submodules/shaderc/update_shaderc_sources.py` ausführen um die Abhängigkeiten von `libshaderc` herunterzuladen.
## Build
Es ist empfohlen eine Out-Of-Source-Build zu nutzen. Dazu im Stammverzeichnis zunächst ein build-Verzeichnis erstellen und hinein wechseln:
Es ist empfohlen ein Out-Of-Source-Build zu nutzen. Dazu im Stammverzeichnis zunächst ein build-Verzeichnis erstellen und hinein wechseln:
``` bash
mkdir build
......@@ -125,3 +129,12 @@ beschrieben
- Anforderungen in Readme aktualisiert.
- FPS können nun im Fenstertitel angezeigt werden
### 1.1
- Diverse Optimierungen
- Integration von Dear ImGui
- Post-Processing-Stage mit einstellbaren Shadern
- beliebige Anzahl an Hitgroups und Miss-Shadern kann geladen werden.
- Jitter-Cam
- Neue Szenen (Cornell-Box)
\section{Motivation}
\gquote{Ich bin ein Test}, sagte \cite{Haines2019}
\ No newline at end of file
\subsection{Grundlagen}
\ No newline at end of file
\subsection{Hardwareunterstützung}
\ No newline at end of file
\section{Einführung zum Raytracing}
\input{components/2_Raytracing/grundlagen.tex}
\input{components/2_Raytracing/umsetzung.tex}
\input{components/2_Raytracing/hardware.tex}
\ No newline at end of file
\subsection{Umsetzung mit Vulkan und NV\_VK\_RAY\_TRACING}
\ No newline at end of file
\section{Die Rendergleichung und ihre Umsetzung im Raytracing}
\ No newline at end of file
\section{Implementierung eines Raytracers mit Vulkan}
\ No newline at end of file
\section{Godrays/Strahlenbüschel}
\input{components/5_Strahlenbüschel/physik.tex}
\ No newline at end of file
\subsection{Physikalische Grundlagen}
\ No newline at end of file
\section{Implementierung der entwickelten Algorithmen}
\ No newline at end of file
\section{Ergebnisse und Auswertung}
\ No newline at end of file
\section{DummyA}
\section{DummyB}
\ No newline at end of file
\begin{abstract}
\end{abstract}
\ No newline at end of file
%-------------------------------------------------------------------------------------------------------------
% Bibliotheken für tikz
%-------------------------------------------------------------------------------------------------------------
\usetikzlibrary{arrows, arrows.meta, shapes, trees, calc, decorations.pathreplacing, positioning}
%-------------------------------------------------------------------------------------------------------------
% Stile für Tikz
%-------------------------------------------------------------------------------------------------------------
\tikzset{current/.style = {draw, circle, fill=yellow!30, inner sep=1pt, minimum size=6mm}}
\tikzset{unvisited/.style = {draw, circle, fill=white, inner sep=1pt, minimum size=6mm}}
\tikzset{visited/.style = {draw, circle, fill=green!20, inner sep=1pt, minimum size=6mm}}
\tikzset{goodResult/.style = {draw, rectangle, fill=green!30, inner sep=1pt, minimum width=3cm}}
\tikzset{badResult/.style = {draw, rectangle, fill=red!30, inner sep=1pt, minimum width=3cm}}
\tikzset{variableNode/.style = {draw, circle, fill=white, inner sep=1pt, minimum size=6mm}}
\tikzset{currentVariableNode/.style = {draw, circle, fill=green!20, inner sep=1pt, minimum size=6mm}}
\tikzset{activeVariableNode/.style = {draw, circle, fill=orange!20, inner sep=1pt, minimum size=6mm}}
\tikzset{clauseNode/.style = {draw, rectangle, fill=white, inner sep=1pt, minimum size=6mm}}
\tikzset{activeClauseNode/.style = {draw, rectangle, fill=orange!20, inner sep=1pt, minimum size=6mm}}
\tikzset{emptyNode/.style = {inner sep=0pt, outer sep=0pt, anchor=base, baseline}}
%-------------------------------------------------------------------------------------------------------------
% Abkürzungen, Displaystyles, etc.
%-------------------------------------------------------------------------------------------------------------
\newcommand\todo[1]{\textcolor{red}{[#1]}\message{TODO: #1}}
\newcommand\dprod[0]{\displaystyle\prod}
\newcommand\tprod[0]{\textstyle\prod}
\newcommand\dsum[0]{\displaystyle\sum}
\newcommand\tsum[0]{\textstyle\sum}
%-------------------------------------------------------------------------------------------------------------
% Messages
%-------------------------------------------------------------------------------------------------------------
\newcommand\xamsg[4]{
\frac{
\dprod_{b\in N(#1)\setminus #2}m_{b\to #1}^{[#4]}(#3)
}
{
\dprod_{b\in N(#1)\setminus #2}m_{b\to #1}^{[#4]}(1) +
\dprod_{b\in N(#1)\setminus #2}m_{b\to #1}^{[#4]}(0)
}
}
\newcommand\axmsg[3]{
1-\dprod_{y\in N(#1)\setminus #2}m_{y\to #1}^{[#3]}(1-value(y, #1))
}
\newcommand\xmsg[2]{
\frac{
\dprod_{b\in N(#1)}m_{b\to #1}^{[#2]}(1)
}
{
\dprod_{b\in N(#1)}m_{b\to #1}^{[#2]}(1) +
\dprod_{b\in N(#1)}m_{b\to #1}^{[#2]}(0)
}
}
\newcommand\xamsgempty{
\frac{
\dprod_{\emptyset}
}
{
\dprod_{\emptyset} +
\dprod_{\emptyset}
}
}
%-------------------------------------------------------------------------------------------------------------
% true/false
%-------------------------------------------------------------------------------------------------------------
\newcommand\true{\textit{wahr}}
\newcommand\false{\textit{falsch}}
%-------------------------------------------------------------------------------------------------------------
% besondere Elemente für tikz
%-------------------------------------------------------------------------------------------------------------
\newcommand\connection[3][]{
\ifthenelse
{
\equal{#1}{}
}
{
\draw (#2) -- (#3);
}
{
\draw (#2) -- (#3) node[midway, fill=white] {\small{#1}};
}
}
\newcommand\negConnection[3][]{
\ifthenelse
{
\equal{#1}{}
}
{
\draw[dashed] (#2) -- (#3);
}
{
\draw[dashed] (#2) -- (#3) node[midway, fill=white] {\small{#1}};
}
}
\newcommand\fadingConnection[3][]{
\ifthenelse
{
\equal{#1}{}
}
{
\draw[dash pattern=on 1cm off 0.1cm on 0.1cm off 0.05cm on 0.05cm off 0.05cm on 0.05cm off 5cm] (#2) -- (#3);
}
{
\draw[dash pattern=on 1cm off 0.1cm on 0.1cm off 0.05cm on 0.05cm off 0.05cm on 0.05cm off 5cm] (#2) -- (#3) node[near start, fill=white] {\small{#1}};
}
}
\newcommand\arrowconnection[3][]{
\ifthenelse
{
\equal{#1}{}
}
{
\draw[draw, -latex] (#2) -- (#3);
}
{
\draw[draw, -latex] (#2) -- (#3) node[midway, fill=white] {\small{#1}};
}
}
%-------------------------------------------------------------------------------------------------------------
% Seitenumbrüche und abstract Title
%-------------------------------------------------------------------------------------------------------------
\newcommand\emptypage{
\newpage\null\thispagestyle{empty}\newpage
}
\newcommand\file[1]{
\texttt{#1}
}
\ifcsname abstitlestyle\endcsname
\renewcommand{\abstitlestyle}[1]{\centering\Large{\textbf{#1}}}
\fi
\ifcsname\glossaryname\endcsname
\renewcommand*{\glossaryname}{Glossar}
\fi
\newcommand\gquote[1]{\glqq#1\grqq}
\sisetup{
output-decimal-marker = {,}
}
\ No newline at end of file
\begin{center}
\includegraphics[width=0.75\textwidth]{data/icons/TU_Chemnitz_positiv_gruen.eps}
\\
\large{Fakultät für Informatik}
\\
\small{Professur Grafische Datenverarbeitung}
\\
\vspace*{1.5cm}
\Huge{Masterarbeit}
\\
\Large{Darstellung von Godrays mit Raytracing}
\\
\vspace{2cm}
Lukas Tietze
\\
Chemnitz, den \today
\\
\vspace{3cm}
\textbf{1. Prüfer: }Prof. Dr. Guido Brunnett \\
\textbf{2. Prüfer: }Daniel Rösner, M.Sc.\\
\end{center}
@book{Haines2019,
title = {Ray Tracing Gems},
editor = {Eric Haines and Tomas Akenine-M\"oller},
publisher = {Apress},
year = {2019},
note ={\url{http://raytracinggems.com}},
}
\ No newline at end of file
\newglossaryentry{Ray}{name={Ray},description={Ein Ray ist ein Strahl, definiert durch Startpunkt und Richtung.}}
\ No newline at end of file
......@@ -2,6 +2,9 @@
\documentclass[11pt,a4paper]{article}
\usepackage{fullpage}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{xifthen}
\usepackage[onehalfspacing]{setspace}
......@@ -12,35 +15,83 @@
\usepackage{amssymb}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{algorithmicx}
\usepackage[Algorithmus]{algorithm}
\usepackage{algpseudocode}
\usepackage{verbatim}
\usepackage{tikz}
\usepackage{fullpage}
\usepackage[hidelinks]{hyperref}
\usepackage{glossaries}
\usepackage{siunitx}
\usepackage{pdfpages}
\usepackage[numberedsection, nonumberlist]{glossaries}
\usepackage{gnuplot-lua-tikz}
\usepackage{chngcntr}
\usepackage[style]{abstract}
%
\usepackage[hidelinks]{hyperref}
%------------------------------
% Initialisierung
%------------------------------
\pdfminorversion=7
\counterwithin{figure}{section}
\counterwithin{table}{section}
%
\include{components/commands}
%
\counterwithin{equation}{section}
\counterwithin{algorithm}{section}
\setcounter{secnumdepth}{3}
\input{components/commands.tex}
\makeglossaries
\loadglsentries{data/glossary.tex}
\glsaddall
\begin{document}
%------------------------------
% Titel
%------------------------------
\pagenumbering{gobble}
\input{components/title}
\thispagestyle{empty}
\input{components/title.tex}
\emptypage
%------------------------------
% Einleitung & Referenzen
%------------------------------
\pagenumbering{roman}
\input{components/abstract.tex}
\tableofcontents
\clearpage
\listoffigures
\clearpage
\listoftables
% \clearpage
% \printglossaries
%------------------------------
% Inhalt
%------------------------------
\pagenumbering{arabic}
\input{components/preamble.tex}
\input{components/grundlagen.tex}
\input{components/problem.tex}
\input{components/quellen.tex}
\input{components/umsetzung.tex}
\input{components/bewertung.tex}
\input{components/gliederung.tex}
\input{components/zeitplan.tex}
\end{document}
\cleardoublepage
\input{components/1_Einführung/part.tex}
\input{components/2_Raytracing/part.tex}
\input{components/3_Rendergleichung/part.tex}
\input{components/4_Grundgerüst/part.tex}
\input{components/5_Strahlenbüschel/part.tex}
\input{components/6_Implementierung/part.tex}
\input{components/7_Auswertung/part.tex}
%------------------------------
% Anhänge
%------------------------------
\appendix
\input{components/X_Anhänge/part.tex}
\printglossaries[type=main, title={Glossar}]
\clearpage
\bibliographystyle{amsplain}
\bibliography{data/bibliography.bib}
\clearpage
\includepdf{data/statement_of_authorship.pdf}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Common style file for TeX, LaTeX and ConTeXt
%%
%% It is associated with the 'gnuplot.lua' script, and usually generated
%% automatically. So take care whenever you make any changes!
%%
% check for the correct TikZ version
\def\gpchecktikzversion#1.#2\relax{%
\ifnum#1<2%
\errmessage{PGF/TikZ version >= 2.0 is required!}%
\fi}
\expandafter\gpchecktikzversion\pgfversion\relax
% FIXME: is there a more elegant way to determine the output format?
\def\pgfsysdriver@a{pgfsys-dvi.def} % ps
\def\pgfsysdriver@b{pgfsys-dvipdfm.def} % pdf
\def\pgfsysdriver@c{pgfsys-dvipdfmx.def} % pdf
\def\pgfsysdriver@d{pgfsys-dvips.def} % ps
\def\pgfsysdriver@e{pgfsys-pdftex.def} % pdf
\def\pgfsysdriver@f{pgfsys-tex4ht.def} % html
\def\pgfsysdriver@g{pgfsys-textures.def} % ps
\def\pgfsysdriver@h{pgfsys-vtex.def} % ps
\def\pgfsysdriver@i{pgfsys-xetex.def} % pdf
\newif\ifgppdfout\gppdfoutfalse
\newif\ifgppsout\gppsoutfalse
\ifx\pgfsysdriver\pgfsysdriver@a
\gppsouttrue
\else\ifx\pgfsysdriver\pgfsysdriver@b
\gppdfouttrue
\else\ifx\pgfsysdriver\pgfsysdriver@c
\gppdfouttrue
\else\ifx\pgfsysdriver\pgfsysdriver@d
\gppsouttrue
\else\ifx\pgfsysdriver\pgfsysdriver@e
\gppdfouttrue
\else\ifx\pgfsysdriver\pgfsysdriver@f
% tex4ht
\else\ifx\pgfsysdriver\pgfsysdriver@g
\gppsouttrue
\else\ifx\pgfsysdriver\pgfsysdriver@h
\gppsouttrue
\else\ifx\pgfsysdriver\pgfsysdriver@i
\gppdfouttrue
\fi\fi\fi\fi\fi\fi\fi\fi\fi
% uncomment the following lines to make font values "appendable"
% and if you are really sure about that ;-)
% \pgfkeyslet{/tikz/font/.@cmd}{\undefined}
% \tikzset{font/.initial={}}
% \def\tikz@textfont{\pgfkeysvalueof{/tikz/font}}
%
% image related stuff
%
\def\gp@rawimage@pdf#1#2#3#4#5#6{%
\def\gp@tempa{cmyk}%
\def\gp@tempb{#1}%
\ifx\gp@tempa\gp@tempb%
\def\gp@temp{/CMYK}%
\else%
\def\gp@temp{/RGB}%
\fi%
\pgf@sys@bp{#4}\pgfsysprotocol@literalbuffered{0 0}\pgf@sys@bp{#5}%
\pgfsysprotocol@literalbuffered{0 0 cm}%
\pgfsysprotocol@literalbuffered{BI /W #2 /H #3 /CS \gp@temp}%
\pgfsysprotocol@literalbuffered{/BPC 8 /F /AHx ID}%
\pgfsysprotocol@literal{#6 > EI}%
}
\def\gp@rawimage@ps#1#2#3#4#5#6{%
\def\gp@tempa{cmyk}%
\def\gp@tempb{#1}%
\ifx\gp@tempa\gp@tempb%
\def\gp@temp{4}%
\else%
\def\gp@temp{3}%
\fi%
\pgfsysprotocol@literalbuffered{0 0 translate}%
\pgf@sys@bp{#4}\pgf@sys@bp{#5}\pgfsysprotocol@literalbuffered{scale}%
\pgfsysprotocol@literalbuffered{#2 #3 8 [#2 0 0 -#3 0 #3]}%
\pgfsysprotocol@literalbuffered{currentfile /ASCIIHexDecode filter}%
\pgfsysprotocol@literalbuffered{false \gp@temp\space colorimage}%
\pgfsysprotocol@literal{#6 >}%
}
\def\gp@rawimage@html#1#2#3#4#5#6{%
% FIXME: print a warning message here
}
\ifgppdfout
\def\gp@rawimage{\gp@rawimage@pdf}
\else
\ifgppsout
\def\gp@rawimage{\gp@rawimage@ps}
\else
\def\gp@rawimage{\gp@rawimage@html}
\fi
\fi
\def\gploadimage#1#2#3#4#5{%
\pgftext[left,bottom,x=#1cm,y=#2cm] {\pgfimage[interpolate=false,width=#3cm,height=#4cm]{#5}};%
}
\def\gp@set@size#1{%
\def\gp@image@size{#1}%
}
\def\gp@rawimage@#1#2#3#4#5#6#7#8{
\tikz@scan@one@point\gp@set@size(#6,#7)\relax%
\tikz@scan@one@point\pgftransformshift(#2,#3)\relax%
\pgftext {%
\pgfsys@beginpurepicture%
\gp@image@size% fill \pgf@x and \pgf@y
\gp@rawimage{#1}{#4}{#5}{\pgf@x}{\pgf@y}{#8}%
\pgfsys@endpurepicture%
}%
}
%% \gprawimage{color model}{xcoord}{ycoord}{# of xpixel}{# of ypixel}{xsize}{ysize}{rgb/cmyk hex data RRGGBB/CCMMYYKK ...}{file name}
%% color model is 'cmyk' or 'rgb' (default)
\def\gprawimage#1#2#3#4#5#6#7#8#9{%
\ifx&#9&%
\gp@rawimage@{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}
\else
\ifgppsout
\gp@rawimage@{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}
\else
\gploadimage{#2}{#3}{#6}{#7}{#9}
\fi
\fi
}
%
% gnuplottex comapatibility
% (see http://www.ctan.org/tex-archive/help/Catalogue/entries/gnuplottex.html)
%
\def\gnuplottexextension@lua{\string tex}
\def\gnuplottexextension@tikz{\string tex}
%
% gnuplot variables getter and setter
%
\def\gpsetvar#1#2{%
\expandafter\xdef\csname gp@var@#1\endcsname{#2}
}
\def\gpgetvar#1{%
\csname gp@var@#1\endcsname %
}
%
% some wrapper code
%
% short for a filled path
\def\gpfill#1{\path[line width=0.1\gpbaselw,draw,fill,#1]}
% short for changing the line width
\def\gpsetlinewidth#1{\pgfsetlinewidth{#1\gpbaselw}}
% short for changing the line type
\def\gpsetlinetype#1{\tikzset{gp path/.style={#1,#1 add}}}
% short for changing the dash pattern
\def\gpsetdashtype#1{\tikzset{gp path/.append style={#1}}}
% short for changing the point size
\def\gpsetpointsize#1{\tikzset{gp point/.style={mark size=#1\gpbasems}}}
% wrapper for color settings
\def\gpcolor#1{\tikzset{global #1}}
\tikzset{rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\tikzset{color=.}}}
\tikzset{global rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\pgfutil@color{.}}}
\tikzset{global color/.code={\pgfutil@color{#1}}}
% prevent plot mark distortions due to changes in the PGF transformation matrix
% use `\gpscalepointstrue' and `\gpscalepointsfalse' for enabling and disabling
% point scaling
%
\newif\ifgpscalepoints
\tikzset{gp shift only/.style={%
\ifgpscalepoints\else shift only\fi%
}}
\def\gppoint#1#2{%
\path[solid] plot[only marks,gp point,mark options={gp shift only},#1] coordinates {#2};%
}
%
% char size calculation, that might be used with gnuplottex
%
% Example code (needs gnuplottex.sty):
%
% % calculate the char size when the "gnuplot" style is used
% \tikzset{gnuplot/.append style={execute at begin picture=\gpcalccharsize}}
%
% \tikzset{gnuplot/.append style={font=\ttfamily\footnotesize}}
%
% \begin{tikzpicture}[gnuplot]
% \begin{gnuplot}[terminal=lua,%
% terminaloptions={tikz solid nopic charsize \the\gphcharsize,\the\gpvcharsize}]
% test
% \end{gnuplot}
% \end{tikzpicture}
%
%%%
% The `\gpcalccharsize' command fills the lengths \gpvcharsize and \gphcharsize with
% the values of the current default font used within nodes and is meant to be called
% within a tikzpicture environment.
%
\newdimen\gpvcharsize
\newdimen\gphcharsize
\def\gpcalccharsize{%
\pgfinterruptboundingbox%
\pgfsys@begininvisible%
\node at (0,0) {%
\global\gphcharsize=1.05\fontcharwd\font`0%
\global\gpvcharsize=1.05\fontcharht\font`0%
\global\advance\gpvcharsize by 1.05\fontchardp\font`g%
};%
\pgfsys@endinvisible%
\endpgfinterruptboundingbox%
}
%
% define a rectangular node in tikz e.g. for the plot area
%
% #1 node name
% #2 coordinate of "south west"
% #3 coordinate of "north east"
%
\def\gpdefrectangularnode#1#2#3{%
\expandafter\gdef\csname pgf@sh@ns@#1\endcsname{rectangle}
\expandafter\gdef\csname pgf@sh@np@#1\endcsname{%
\def\southwest{#2}%
\def\northeast{#3}%
}
\pgfgettransform\pgf@temp%
% once it is defined, no more transformations will be applied, I hope
\expandafter\xdef\csname pgf@sh@nt@#1\endcsname{\pgf@temp}%
\expandafter\xdef\csname pgf@sh@pi@#1\endcsname{\pgfpictureid}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% You may want to adapt the following to fit your needs (in your
%% individual style file and/or within your document).
%%
%
% style for every plot
%
\tikzset{gnuplot/.style={%
>=stealth',%
line cap=round,%
line join=round,%
}}
\tikzset{gp node left/.style={anchor=mid west,yshift=-.12ex}}
\tikzset{gp node center/.style={anchor=mid,yshift=-.12ex}}
\tikzset{gp node right/.style={anchor=mid east,yshift=-.12ex}}
% basic plot mark size (points)
\newdimen\gpbasems
\gpbasems=.4pt
% basic linewidth
\newdimen\gpbaselw
\gpbaselw=.4pt
% this is the default color for pattern backgrounds
\colorlet{gpbgfillcolor}{white}
% set background color and fill color
\def\gpsetbgcolor#1{%
\pgfutil@definecolor{gpbgfillcolor}{rgb}{#1}%
\tikzset{tight background,background rectangle/.style={fill=gpbgfillcolor},show background rectangle}%
}
% this should reverse the normal text node presets, for the
% later referencing as described below
\tikzset{gp refnode/.style={coordinate,yshift=.12ex}}
% to add an empty label with the referenceable name "my node"
% to the plot, just add the following line to your gnuplot
% file:
%
% set label "" at 1,1 font ",gp refnode,name=my node"
%
% enlargement of the bounding box in standalone mode (only used by LaTeX/ConTeXt)
\def\gpbboxborder{0mm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% The following TikZ-styles are derived from the 'pgf.styles.*' tables
%% in the Lua script.
%% To change the number of used styles you should change them there and
%% regenerate this style file.
%%
% arrow styles settings
\tikzset{gp arrow 1/.style={>=latex}}
\tikzset{gp arrow 2/.style={>=angle 90}}
\tikzset{gp arrow 3/.style={>=angle 60}}
\tikzset{gp arrow 4/.style={>=angle 45}}
\tikzset{gp arrow 5/.style={>=o}}
\tikzset{gp arrow 6/.style={>=*}}
\tikzset{gp arrow 7/.style={>=diamond}}
\tikzset{gp arrow 8/.style={>=open diamond}}
\tikzset{gp arrow 9/.style={>={]}}}
\tikzset{gp arrow 10/.style={>={[}}}
\tikzset{gp arrow 11/.style={>=)}}
\tikzset{gp arrow 12/.style={>=(}}
% plotmark settings
\tikzset{gp mark 0/.style={mark size=.5\pgflinewidth,mark=*}}
\tikzset{gp mark 1/.style={mark=+}}
\tikzset{gp mark 2/.style={mark=x}}
\tikzset{gp mark 3/.style={mark=star}}
\tikzset{gp mark 4/.style={mark=square}}
\tikzset{gp mark 5/.style={mark=square*}}
\tikzset{gp mark 6/.style={mark=o}}
\tikzset{gp mark 7/.style={mark=*}}
\tikzset{gp mark 8/.style={mark=triangle}}
\tikzset{gp mark 9/.style={mark=triangle*}}
\tikzset{gp mark 10/.style={mark=triangle,every mark/.append style={rotate=180}}}
\tikzset{gp mark 11/.style={mark=triangle*,every mark/.append style={rotate=180}}}
\tikzset{gp mark 12/.style={mark=diamond}}
\tikzset{gp mark 13/.style={mark=diamond*}}
\tikzset{gp mark 14/.style={mark=otimes}}
\tikzset{gp mark 15/.style={mark=oplus}}
% pattern settings
\tikzset{gp pattern 0/.style={white}}
\tikzset{gp pattern 1/.style={pattern=north east lines}}
\tikzset{gp pattern 2/.style={pattern=north west lines}}
\tikzset{gp pattern 3/.style={pattern=crosshatch}}
\tikzset{gp pattern 4/.style={pattern=grid}}
\tikzset{gp pattern 5/.style={pattern=vertical lines}}
\tikzset{gp pattern 6/.style={pattern=horizontal lines}}
\tikzset{gp pattern 7/.style={pattern=dots}}
\tikzset{gp pattern 8/.style={pattern=crosshatch dots}}
\tikzset{gp pattern 9/.style={pattern=fivepointed stars}}
\tikzset{gp pattern 10/.style={pattern=sixpointed stars}}
\tikzset{gp pattern 11/.style={pattern=bricks}}
% if the 'tikzplot' option is used the corresponding lines will be smoothed by default
\tikzset{gp plot axes/.style=}
\tikzset{gp plot border/.style=}
\tikzset{gp plot 0/.style=smooth}
\tikzset{gp plot 1/.style=smooth}
\tikzset{gp plot 2/.style=smooth}
\tikzset{gp plot 3/.style=smooth}
\tikzset{gp plot 4/.style=smooth}
\tikzset{gp plot 5/.style=smooth}
\tikzset{gp plot 6/.style=smooth}
\tikzset{gp plot 7/.style=smooth}
% linestyle settings
\tikzset{gp lt axes/.style=dotted}
\tikzset{gp lt border/.style=solid}
% linestyle "addon" settings for overwriting a default linestyle within the
% TeX document via eg. \tikzset{gp lt plot 1 add/.style={fill=black,draw=none}} etc.
\tikzset{gp lt axes add/.style={}}
\tikzset{gp lt border add/.style={}}
\tikzset{gp lt plot 0 add/.style={}}
\tikzset{gp lt plot 1 add/.style={}}
\tikzset{gp lt plot 2 add/.style={}}
\tikzset{gp lt plot 3 add/.style={}}
\tikzset{gp lt plot 4 add/.style={}}
\tikzset{gp lt plot 5 add/.style={}}
\tikzset{gp lt plot 6 add/.style={}}
\tikzset{gp lt plot 7 add/.style={}}
\tikzset{gp lt plot 0/.style={}}
\tikzset{gp lt plot 1/.style={}}
\tikzset{gp lt plot 2/.style={}}
\tikzset{gp lt plot 3/.style={}}
\tikzset{gp lt plot 4/.style={}}
\tikzset{gp lt plot 5/.style={}}
\tikzset{gp lt plot 6/.style={}}
\tikzset{gp lt plot 7/.style={}}
% linestyle color settings
\colorlet{gp lt color axes}{black!30}
\colorlet{gp lt color border}{black}
% dash type settings
% Define this as a macro so that the dash patterns expand later with the current \pgflinewidth.
\def\gpdashlength{\pgflinewidth}
\tikzset{gp dt 0/.style={solid}}
\tikzset{gp dt 1/.style={solid}}
\tikzset{gp dt 2/.style={dash pattern=on 7.5*\gpdashlength off 7.5*\gpdashlength}}
\tikzset{gp dt 3/.style={dash pattern=on 3.75*\gpdashlength off 5.625*\gpdashlength}}
\tikzset{gp dt 4/.style={dash pattern=on 1*\gpdashlength off 2.8125*\gpdashlength}}
\tikzset{gp dt 5/.style={dash pattern=on 11.25*\gpdashlength off 3.75*\gpdashlength on 1*\gpdashlength off 3.75*\gpdashlength}}
\tikzset{gp dt 6/.style={dash pattern=on 5.625*\gpdashlength off 5.625*\gpdashlength on 1*\gpdashlength off 5.625*\gpdashlength}}
\tikzset{gp dt 7/.style={dash pattern=on 3.75*\gpdashlength off 3.75*\gpdashlength on 3.75*\gpdashlength off 11.25*\gpdashlength}}
\tikzset{gp dt 8/.style={dash pattern=on 1*\gpdashlength off 3.75*\gpdashlength on 11.25*\gpdashlength off 3.75*\gpdashlength on 1*\gpdashlength off 3.75*\gpdashlength}}
\tikzset{gp dt solid/.style={solid}}
\tikzset{gp dt axes/.style={dotted}}
% command for switching to colored lines
\def\gpcoloredlines{%
\colorlet{gp lt color 0}{red}%
\colorlet{gp lt color 1}{green}%
\colorlet{gp lt color 2}{blue}%
\colorlet{gp lt color 3}{magenta}%
\colorlet{gp lt color 4}{cyan}%
\colorlet{gp lt color 5}{yellow}%
\colorlet{gp lt color 6}{orange}%
\colorlet{gp lt color 7}{purple}%
}
% command for switching to monochrome (black) lines
\def\gpmonochromelines{%
\colorlet{gp lt color 0}{black}%
\colorlet{gp lt color 1}{black}%
\colorlet{gp lt color 2}{black}%
\colorlet{gp lt color 3}{black}%
\colorlet{gp lt color 4}{black}%
\colorlet{gp lt color 5}{black}%
\colorlet{gp lt color 6}{black}%
\colorlet{gp lt color 7}{black}%
}
%
% some initialisations
%
% by default all lines will be colored
\gpcoloredlines
\gpsetpointsize{4}
\gpsetlinetype{gp lt solid}
\gpscalepointsfalse
\endinput
%%
%% LaTeX wrapper for gnuplot-tikz style file
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{gnuplot-lua-tikz}%
[2016/07/23 (rev. 102) GNUPLOT Lua terminal style]
\RequirePackage{tikz}
\usetikzlibrary{arrows,patterns,plotmarks,backgrounds,fit}
\input gnuplot-lua-tikz-common.tex
\endinput
%%
%% plain TeX wrapper for gnuplot-tikz style file
%%
\input tikz.tex
\usetikzlibrary{arrows,patterns,plotmarks,backgrounds}
\edef\tikzatcode{\the\catcode`\@}
\catcode`\@=11
\input gnuplot-lua-tikz-common.tex
\catcode`\@=\tikzatcode
\endinput
\newglossaryentry{satProblem}
{
name = {SAT-Problem},
description = {Das Erfüllbarkeitsproblem der Aussagenlogik. Die Frage, ob eine Anzahl Variablen so mit
{\true} oder {\false} belegt werden kann, dass eine aussagenlogische Formel zu {\true}
ausgewertet wird.},
}
\newglossaryentry{satInstance}
{
name = {SAT-Instanz},
description = {Ein konkreter Fall des SAT-Problems für eine konkrete aussagenlogische Formel.},
}
\newglossaryentry{searchDepth}
{
name = {Suchtiefe},
description = {Die maximale Tiefe, bis zu der rekursiver Belief Propagation einen Faktorgraphen
durchsucht},
}
\newglossaryentry{factorgraph}
{
name = {Faktorgraph},
description = {Die Darstellung einer aussagenlogischen Formel als ungerichteter Graph.},
}
\newglossaryentry{phaseTransition}
{
name={Phasenübergang},
description={Der Dichtebereich, in dem der Anteil der erfüllbaren Formeln stark abnimmt},
}
\newglossaryentry{decimationStrategy}
{
name={Dezimationsstrategie},
description={Die Strategie, nach der ausgewählt wird, welche Variable als nächstes belegt werden soll},
}
\newglossaryentry{updateStrategy}
{
name={Updatestrategie},
description={Die Reihenfolge, in der die Nachrichten des Faktorgraphen aktualisiert werden (betrifft nur
iterative Belief Propagation)},
}
% \newglossaryentry{}
% {
% name={},
% description={},
% }
\ No newline at end of file
import commonFunctions
import os
import sys
import shutil
argc = len(sys.argv)
......@@ -10,37 +13,41 @@ if argc == 2:
if os.path.exists(workingDir):
os.chdir(sys.argv[1])
print("Working in %s" % os.getcwd())
printInfo("Working in %s" % os.getcwd())
else:
print("%s is not a valid working directory" % workingDir)
printError("%s is not a valid working directory" % workingDir)
good = 0
else:
print("Provide working directory as argument!")
printError("Provide working directory as argument!")
good = 0
if good == 0:
print("debug: ")
printWarning("debug: ")
for x in sys.argv:
print(x)
printWarning(x)
exit()
cmdLatex = "texfot -tee=\".\\tex.fot\" pdflatex -output-format=pdf -interaction=nonstopmode -file-line-error document.tex"
cmdGlossaries = "makeglossaries"
cmdBib = "bibtex -terse"
print("\033[1;33m Latex first run \033[0m")
success = os.system(cmdLatex)
beginPart("Latex first run")
success = command(cmdLatex)
# print("\033[1;33m Bibtex \033[0m")
# os.system(cmdBib + " document.bbl")
if success == 0:
beginPart("Bibtex")
command("bibtex document")
# print("\033[1;33m Makeglossaries\033[0m")
# os.system(cmdGlossaries + "glossary.tex")
beginPart("Makeglossaries")
command("makeglossaries document")
if success == 0:
print("\033[1;33m Latex second run\033[0m")
os.system(cmdLatex)
beginPart("Latex second run")
success = command(cmdLatex)
if success == 0:
beginPart("Latex final run")
command(cmdLatex)
else:
printError("Stopping after printError")
else:
print("\033[1;33m Stopping after error!\033[0m")
printError("Stopping after printError")
import os
import subprocess
import sys
from shutil import get_terminal_size
ColorBlack = "\u001b[30m"
ColorRed = "\u001b[31m"
ColorGreen = "\u001b[32m"
ColorYellow = "\u001b[33m"
ColorBlue = "\u001b[34m"
ColorMagenta = "\u001b[35m"
ColorCyan = "\u001b[36m"
ColorWhite = "\u001b[37m"
ColorReset = "\u001b[0m"
def printInfo(message):
print(ColorBlue, message, ColorReset)
pass
def printWarning(message):
print(ColorYellow, message, ColorReset)
pass
def printError(message):
print(ColorRed, message, ColorReset)
pass
def printStatus(message):
print(ColorCyan, message, ColorReset)
pass
def printSuccess(message):
print(ColorGreen, message, ColorReset)
pass
def beginPart(name):
w = int(get_terminal_size([50, 1]).columns * 0.75)
namePadding = int((w - len(name)) / 2)
printInfo("-" * w)
printInfo((" " * namePadding) + name + (" " * namePadding))
printInfo("-" * w)
pass
def command(cmd, input=sys.stdin) -> int:
printStatus(cmd)
res = subprocess.run(cmd, stdin=input)
str = f"Done, action result: {res.returncode}"
if(res.returncode == 0):
printSuccess(str)
else:
printWarning(str)
return res.returncode
pass
from commonFunctions import *
import os
import io
import sys
import subprocess
beginPart("Spell Checking")
dryRun = "-dry" in sys.argv
for root, subdirs, files in os.walk("."):
res = []
for file in files:
if os.path.splitext(file)[1] == ".tex":
filePath = os.path.join(root, file)
if file in sys.argv or filePath in sys.argv:
printWarning("Ignoring file " + filePath)
else:
printInfo("Checking " + filePath)
if not dryRun:
res.append(subprocess.run("aspell --lang=De-de --mode=tex -a",
stdin=io.open(filePath), stdout=io.open("res", "w")))