From cbf9a3172c91eb82ed903727c3c93a9c41e1dcfd Mon Sep 17 00:00:00 2001 From: Martin Thoma Date: Fri, 21 Sep 2012 10:57:15 +0200 Subject: [PATCH] added circle as an example for a convex metric space --- tikz/circle-convex-metric-space/Makefile | 32 +++++++++++++++++++ .../circle-convex-metric-space.tex | 26 +++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 tikz/circle-convex-metric-space/Makefile create mode 100644 tikz/circle-convex-metric-space/circle-convex-metric-space.tex diff --git a/tikz/circle-convex-metric-space/Makefile b/tikz/circle-convex-metric-space/Makefile new file mode 100644 index 0000000..5025a11 --- /dev/null +++ b/tikz/circle-convex-metric-space/Makefile @@ -0,0 +1,32 @@ +SOURCE = circle-convex-metric-space +DELAY = 80 +DENSITY = 300 +WIDTH = 500 + +make: + pdflatex $(SOURCE).tex -output-format=pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux + +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: + make + #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/circle-convex-metric-space/circle-convex-metric-space.tex b/tikz/circle-convex-metric-space/circle-convex-metric-space.tex new file mode 100644 index 0000000..2fda86a --- /dev/null +++ b/tikz/circle-convex-metric-space/circle-convex-metric-space.tex @@ -0,0 +1,26 @@ +\documentclass[varwidth=true, border=2pt]{standalone} +\usepackage{tikz} +\usetikzlibrary{shapes, calc, shapes, arrows} +\usepackage{amsmath,amssymb} + +\usepackage{xcolor} +\definecolor{xvectorcolor}{HTML}{77933C} + +\begin{document} +\begin{tikzpicture} + \path (160:1) coordinate (X); + \path ( 20:1) coordinate (Y); + \path ( 80:1) coordinate (Z); + + \draw (0,0) circle (1); + + \fill[color=blue] (X) circle (2pt); + \draw[blue] (X) node [right] {$x$}; + + \fill[color=blue] (Y) circle (2pt); + \draw[blue] (Y) node [left] {$y$}; + + \fill[color=red] (Z) circle (2pt); + \draw[red] (Z) node [below] {$z$}; +\end{tikzpicture} +\end{document}