Browse Source

added triangle-thales-circle

Martin Thoma 11 years ago
parent
commit
936e76e115

+ 31 - 0
tikz/triangle-thales-circle/Makefile

@@ -0,0 +1,31 @@
+SOURCE  = triangle-thales-circle
+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/triangle-thales-circle/README.md

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

BIN
tikz/triangle-thales-circle/triangle-thales-circle.png


+ 31 - 0
tikz/triangle-thales-circle/triangle-thales-circle.tex

@@ -0,0 +1,31 @@
+\documentclass[varwidth=true, border=2pt]{standalone}
+\usepackage{tkz-euclide}
+
+\begin{document}
+\usetkzobj{all}
+\begin{tikzpicture}
+    \tkzSetUpPoint[shape=circle,size=10,color=black,fill=black]
+    \tkzSetUpLine[line width=1]
+    \tkzDefPoints{0/0/O, -5/0/A, 5/0/B, 5/5/M, -5/5/N}
+    \tkzDefPoint(60:5){X}
+    \tkzDefPoint(150:5){Y}
+
+    \tkzDrawArc[color=black, thick, fill=gray!20](O,B)(A)
+
+    % Avoid too long edges of polygon
+    \tkzClipPolygon(A,B,M,N)
+    \tkzClipCircle(O,B)
+
+    \tkzDrawPolygon[fill=red,fill opacity=0.5](A,B,X)
+    \tkzMarkRightAngle(A,X,B)
+
+    \tkzDrawPolygon[fill=blue,fill opacity=0.5](A,B,Y)
+    \tkzMarkRightAngle(A,Y,B)
+
+    % lines should not colored
+    \tkzDrawPolygon(A,B,X)
+    \tkzDrawPolygon(A,B,Y)
+
+    \tkzDrawArc[color=black, thick](O,B)(A)
+\end{tikzpicture}
+\end{document}