Martin Thoma 12 anos atrás
pai
commit
9e8e6ab4bf

+ 31 - 0
tikz/neighbourhood-topology-open/Makefile

@@ -0,0 +1,31 @@
+SOURCE = neighbourhood-topology-open
+DELAY = 80
+DENSITY = 300
+WIDTH = 512
+
+make:
+	pdflatex $(SOURCE).tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
+
+gif:
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
+
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+
+transparentGif:
+	convert $(SOURCE).pdf -transparent white result.gif
+	make clean
+
+svg:
+	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
+	pdf2svg $(SOURCE).pdf $(SOURCE).svg
+	# Necessary, as pdf2svg does not always create valid svgs:
+	inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg

+ 3 - 0
tikz/neighbourhood-topology-open/Readme.md

@@ -0,0 +1,3 @@
+Compiled example
+----------------
+![Example](neighbourhood-topology-open.png)

+ 75 - 0
tikz/neighbourhood-topology-open/neighbourhood-topology-open.tex

@@ -0,0 +1,75 @@
+\documentclass[varwidth=true, border=2pt]{standalone}
+\usepackage{tikz}
+\usetikzlibrary{patterns}
+\usepackage{pgfplots}
+\pgfplotsset{compat=1.7}
+
+\begin{document}
+\begin{tikzpicture}
+    \begin{axis}[
+        axis x line=middle,
+        axis y line=middle,
+        %width=9cm,
+        %height=4.5cm,
+        xmin=-1,     % start the diagram at this x-coordinate
+        xmax= 5,     % end   the diagram at this x-coordinate
+        ymin=-1,     % start the diagram at this y-coordinate
+        ymax= 5,     % end   the diagram at this y-coordinate
+        xlabel=$Y$,
+        ylabel=$X$,
+        ticks=none,
+        enlargelimits=true,
+        after end axis/.code={
+            \draw [decorate,decoration={brace,mirror,raise=15pt}, orange] (axis cs:0,3.6) -- (axis cs:0,2.5) node [midway,left=20pt,orange] {$V_{x,y}$};
+            \draw [decorate,decoration={brace,mirror,raise=12pt}, green]  (axis cs:1.5,0) -- (axis cs:2.5,0) node [midway,below=16pt,green] {$U_{x,y}$};
+        }]
+
+        \addplot[mark=none, red, smooth cycle, thick, fill=red!30] coordinates {(1,1) (2,0.5) (3,1.5) (3,2) (3.5,3) (3.2, 5) (2.2, 4.7) (1.5, 4.2) (1.1, 3.9) (0.9, 2.5)};
+        \node[red] at (axis cs:4,4) [anchor=south] {$W_i$};
+
+        % Draw help lines
+        %\addplot[dashed] coordinates {(1.5,0) (1.5,3.6)};
+        %\addplot[dashed] coordinates {(2.5,0) (2.5,3.6)};
+        %\addplot[dashed] coordinates {(0,2.5) (2.5,2.5)};
+        %\addplot[dashed] coordinates {(0,3.6) (2.5,3.6)};
+
+        % Draw solid square
+        \addplot[mark=none, orange, thick] coordinates {(2.5,2.5) (2.5,3.6)};
+        \addplot[mark=none, green, thick]  coordinates {(2.5,3.6) (1.5,3.6)};
+        \addplot[mark=none, orange, thick] coordinates {(1.5,3.6) (1.5,2.5)};
+        \addplot[mark=none, green, thick]  coordinates {(1.5,2.5) (2.5,2.5)};
+
+        \addplot[mark=none, orange, thick] coordinates {(3.0,1.5) (3.0,2.6)};
+        \addplot[mark=none, green, thick]  coordinates {(3.0,2.6) (1.1,2.6)};
+        \addplot[mark=none, orange, thick] coordinates {(1.1,1.5) (1.1,2.6)};
+        \addplot[mark=none, green, thick]  coordinates {(1.1,1.5) (3.0,1.5)};
+
+
+        \addplot[mark=none, orange, thick] coordinates {(3.0,1.5) (3.0,2.6)};
+        \addplot[mark=none, green, thick]  coordinates {(3.0,2.6) (1.1,2.6)};
+        \addplot[mark=none, orange, thick] coordinates {(1.1,1.5) (1.1,2.6)};
+        \addplot[mark=none, green, thick]  coordinates {(1.1,1.5) (3.0,1.5)};
+
+        \addplot[mark=none, blue, thick, dashed]  coordinates {((1.8,0) (1.8,5)};
+        \addplot[mark=none, blue, thick, dashed]  coordinates {((2.2,0) (2.2,5)};
+
+        % Draw x and annotation
+        \node at (axis cs:2,3) [anchor=-90] {$x$};
+        \addplot[mark=*] coordinates {(2,3)};
+
+        % Draw ticks of help lines
+        \addplot[mark=none, green, thick] coordinates {(1.5, -0.1) (1.5,0.1)};
+        \addplot[mark=none, green, thick] coordinates {(2.5, -0.1) (2.5,0.1)};
+        \addplot[mark=none, green, thick] coordinates {(1.5, 0) (2.5,0)};
+
+        \addplot[mark=none, orange, thick] coordinates {(-0.1, 2.5) (0.1,2.5)};
+        \addplot[mark=none, orange, thick] coordinates {(-0.1, 3.6) (0.1,3.6)};
+        \addplot[mark=none, orange, thick] coordinates {(0, 2.5) (0,3.6)};
+
+        % Draw axis text
+        \node at (axis cs:0,3) [anchor=east] {$y$};
+        \node at (axis cs:2,0) [anchor=north] {$x$};
+
+    \end{axis} 
+\end{tikzpicture}
+\end{document}

+ 31 - 0
tikz/topology-1/Makefile

@@ -0,0 +1,31 @@
+SOURCE = topology-1
+DELAY = 80
+DENSITY = 300
+WIDTH = 512
+
+make:
+	pdflatex $(SOURCE).tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
+
+gif:
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
+
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+
+transparentGif:
+	convert $(SOURCE).pdf -transparent white result.gif
+	make clean
+
+svg:
+	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
+	pdf2svg $(SOURCE).pdf $(SOURCE).svg
+	# Necessary, as pdf2svg does not always create valid svgs:
+	inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg

+ 3 - 0
tikz/topology-1/Readme.md

@@ -0,0 +1,3 @@
+Compiled example
+----------------
+![Example](topology-1.png)

BIN
tikz/topology-1/topology-1.png


+ 41 - 0
tikz/topology-1/topology-1.tex

@@ -0,0 +1,41 @@
+\documentclass[varwidth=true, border=2pt]{standalone}
+\usepackage{tikz}
+\usetikzlibrary{patterns}
+\usepackage{pgfplots}
+\pgfplotsset{compat=1.7}
+
+\begin{document}
+\begin{tikzpicture}
+    \begin{axis}[
+        axis x line=none,
+        axis y line=none,
+        %width=9cm,
+        %height=4.5cm,
+        xmin= 0,     % start the diagram at this x-coordinate
+        xmax= 5,     % end   the diagram at this x-coordinate
+        ymin= 0,     % start the diagram at this y-coordinate
+        ymax= 5,     % end   the diagram at this y-coordinate
+        xlabel=$Y$,
+        ylabel=$X$,
+        ticks=none,
+        enlargelimits=true]
+
+        \addplot[mark=none, red, smooth cycle, thick, fill=red!30] coordinates {(0,0) (2,0.2) (3,1.5) (3,2) (3.5,3) (3.2, 5) (2.2, 4.7) (1.5, 4.2) (1.1, 3.9) (0.2, 2.5)};
+        \node[red] at (axis cs:4,4) [anchor=south] {$X_i$};
+
+        % Draw solid square
+        \addplot[mark=none, thick] coordinates {(1.5,2.0) (2.5,2.0) (2.5,3.6) (1.5,3.6) (1.5,2.0)};
+        \node at (axis cs:2.7,3.2) [anchor=90] {$K$};
+
+
+        % Draw x and annotation
+        \node at (axis cs:1.8,3.2) [anchor=-90] {$x$};
+        \draw (axis cs:1.8,3.2) circle[radius=0.6];
+        \addplot[mark=*] coordinates {(1.8,3.2)};
+
+        \node at (axis cs:0.8,1.2) [anchor=-90] {$y$};
+        \draw (axis cs:0.8,1.2) circle[radius=0.6];
+        \addplot[mark=*] coordinates {(0.8,1.2)};
+    \end{axis} 
+\end{tikzpicture}
+\end{document}