diff --git a/tikz/triangle-thales-circle/Makefile b/tikz/triangle-thales-circle/Makefile new file mode 100644 index 0000000..c4063f2 --- /dev/null +++ b/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 diff --git a/tikz/triangle-thales-circle/README.md b/tikz/triangle-thales-circle/README.md new file mode 100644 index 0000000..fd1a24d --- /dev/null +++ b/tikz/triangle-thales-circle/README.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](triangle-thales-circle.png) diff --git a/tikz/triangle-thales-circle/triangle-thales-circle.png b/tikz/triangle-thales-circle/triangle-thales-circle.png new file mode 100644 index 0000000..b24e589 Binary files /dev/null and b/tikz/triangle-thales-circle/triangle-thales-circle.png differ diff --git a/tikz/triangle-thales-circle/triangle-thales-circle.tex b/tikz/triangle-thales-circle/triangle-thales-circle.tex new file mode 100644 index 0000000..5fbf727 --- /dev/null +++ b/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}