Jelajahi Sumber

added circle as an example for a convex metric space

Martin Thoma 13 tahun lalu
induk
melakukan
cbf9a3172c

+ 32 - 0
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

+ 26 - 0
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}