From 5259753e8cbf407330e19a18fbbdaa73e6c7b9ea Mon Sep 17 00:00:00 2001 From: Martin Thoma Date: Sun, 2 Dec 2012 17:19:58 +0100 Subject: [PATCH] added 3 more examples --- .../3d-cmos-loss-diagram.svg | 11200 ++++++++++++++++ .../3d-cmos-loss-diagram.tex | 43 + tikz/3d-cmos-loss-diagram/Makefile | 31 + tikz/3d-function-9/3d-function-9.tex | 40 + tikz/3d-function-9/Makefile | 31 + tikz/line-reflection/Makefile | 31 + tikz/line-reflection/line-reflection.tex | 45 + 7 files changed, 11421 insertions(+) create mode 100644 tikz/3d-cmos-loss-diagram/3d-cmos-loss-diagram.svg create mode 100644 tikz/3d-cmos-loss-diagram/3d-cmos-loss-diagram.tex create mode 100644 tikz/3d-cmos-loss-diagram/Makefile create mode 100644 tikz/3d-function-9/3d-function-9.tex create mode 100644 tikz/3d-function-9/Makefile create mode 100644 tikz/line-reflection/Makefile create mode 100644 tikz/line-reflection/line-reflection.tex diff --git a/tikz/3d-cmos-loss-diagram/3d-cmos-loss-diagram.svg b/tikz/3d-cmos-loss-diagram/3d-cmos-loss-diagram.svg new file mode 100644 index 0000000..459a776 --- /dev/null +++ b/tikz/3d-cmos-loss-diagram/3d-cmos-loss-diagram.svg @@ -0,0 +1,11200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tikz/3d-cmos-loss-diagram/3d-cmos-loss-diagram.tex b/tikz/3d-cmos-loss-diagram/3d-cmos-loss-diagram.tex new file mode 100644 index 0000000..0499429 --- /dev/null +++ b/tikz/3d-cmos-loss-diagram/3d-cmos-loss-diagram.tex @@ -0,0 +1,43 @@ +\documentclass{article} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{pgfplots} +\usepgfplotslibrary{patchplots} + +\begin{document} +\begin{preview} +\pgfplotsset{ + colormap={whitered}{ + color(0cm)=(white); + color(1cm)=(orange!75!red) + } +} +\begin{tikzpicture} + \begin{axis}[ + colormap name=whitered, + width=15cm, + view={10}{15}, + enlargelimits=false, + grid=major, + domain=1.5:6, + y domain=0:10^9, + ymode=log, + samples=46, %57 : TeX capacity exceeded, sorry [main memory size=3000000]. + % see also http://tex.stackexchange.com/a/7954/5645 + xlabel=$V_{dd}$ in V, + ylabel=$f$ in Hz, + zlabel=$P_v$ in mW, + %colorbar, + %colorbar style={ + % at={(-0.1,0)}, + % anchor=south west, + % height=0.25*\pgfkeysvalueof{/pgfplots/parent axis height}, + % title={$f(x,y)$} + %} + ] + %\addplot3[patch,patch type=bilinear,mesh,black] {0}; + \addplot3[surf,opacity=0.9] {x*x*y}; + \end{axis} +\end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/3d-cmos-loss-diagram/Makefile b/tikz/3d-cmos-loss-diagram/Makefile new file mode 100644 index 0000000..cc692ec --- /dev/null +++ b/tikz/3d-cmos-loss-diagram/Makefile @@ -0,0 +1,31 @@ +SOURCE = 3d-cmos-loss-diagram +DELAY = 80 +DENSITY = 300 +WIDTH = 500 + +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 diff --git a/tikz/3d-function-9/3d-function-9.tex b/tikz/3d-function-9/3d-function-9.tex new file mode 100644 index 0000000..962205e --- /dev/null +++ b/tikz/3d-function-9/3d-function-9.tex @@ -0,0 +1,40 @@ +\documentclass{article} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{pgfplots} + +\begin{document} +\begin{preview} +\pgfplotsset{ + colormap={whitered}{ + color(0cm)=(white); + color(1cm)=(orange!75!red) + } +} +\begin{tikzpicture} + \begin{axis}[ + colormap name=whitered, + width=15cm, + view={60}{55}, + enlargelimits=false, + grid=major, + domain=-2:2, + y domain=-5:5, + samples=50, %57 : TeX capacity exceeded, sorry [main memory size=3000000]. + % see also http://tex.stackexchange.com/a/7954/5645 + xlabel=$x$, + ylabel=$y$, + zlabel={$z$}, + colorbar, + colorbar style={ + at={(-0.1,0)}, + anchor=south west, + height=0.25*\pgfkeysvalueof{/pgfplots/parent axis height}, + title={$f(x,y)$} + } + ] + \addplot3[surf] {sin((x*x)r)*y}; + \end{axis} +\end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/3d-function-9/Makefile b/tikz/3d-function-9/Makefile new file mode 100644 index 0000000..99f1532 --- /dev/null +++ b/tikz/3d-function-9/Makefile @@ -0,0 +1,31 @@ +SOURCE = 3d-function-9 +DELAY = 80 +DENSITY = 300 +WIDTH = 500 + +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 diff --git a/tikz/line-reflection/Makefile b/tikz/line-reflection/Makefile new file mode 100644 index 0000000..e2c0438 --- /dev/null +++ b/tikz/line-reflection/Makefile @@ -0,0 +1,31 @@ +SOURCE = line-reflection +DELAY = 80 +DENSITY = 300 +WIDTH = 500 + +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 diff --git a/tikz/line-reflection/line-reflection.tex b/tikz/line-reflection/line-reflection.tex new file mode 100644 index 0000000..e13e215 --- /dev/null +++ b/tikz/line-reflection/line-reflection.tex @@ -0,0 +1,45 @@ +\documentclass[varwidth=true, border=2pt]{standalone} + +\usepackage{tkz-fct} +\usetikzlibrary{arrows, decorations.pathreplacing} + +\begin{document} +\begin{tikzpicture} + \tkzInit [xmin=0,xmax=7.8,ymin=0,ymax=9.5] + \begin{scriptsize} + \tkzGrid[color = gray!30!white] + \tkzAxeXY + \end{scriptsize} + \draw[thick,green] (0,3.6) -- (8,6.5); + \node[green,rotate=20] at (6.5,6.15) {$\scriptstyle g(x) = m \cdot x + t$}; + + \draw[dashed,red] (5.5,1) -- (2.5,9); + + \draw[thick,fill=red,red] (5.5,1) circle (2pt); + \node[red] at (5.6,1.25) {$P$}; + + \draw[thick,fill=red,red] (2.5,9) circle (2pt); + \node[red] at (2.8,9) {$P'$}; + + \draw[dashed] (2.5,5.05) -- (5.6,5.05); + + \draw [decorate,decoration={brace,amplitude=10pt,mirror,raise=4pt},yshift=0pt] + (5.5,1) -- (5.5,5.05) node [black,midway,xshift=0.8cm] {\footnotesize + $\Delta y$}; + + \draw [decorate,decoration={brace,amplitude=10pt,mirror,raise=4pt},yshift=0pt] + (2.5,9) -- (2.5,5.05) node [black,midway,xshift=-0.8cm] {\footnotesize + $\Delta y$}; + + \draw [decorate,decoration={brace,amplitude=2pt,mirror,raise=2pt},yshift=0pt] + (2.5,5.05) -- (3.97,5.05) node [black,midway,yshift=-0.4cm] {\footnotesize + $\Delta x$}; + + \draw [decorate,decoration={brace,amplitude=2pt,mirror,raise=2pt},yshift=0pt] + (3.97,5.05) -- (5.5,5.05) node [black,midway,yshift=-0.4cm] {\footnotesize + $\Delta x$}; + + \draw[thick,fill=red,red] (3.97,5.05) circle (2pt); + \node[red] at (4.1,5.4) {$L$}; +\end{tikzpicture} +\end{document}