2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

added triangle-thales-circle

This commit is contained in:
Martin Thoma 2014-10-20 20:53:13 +02:00
parent a53b07116e
commit 936e76e115
4 changed files with 65 additions and 0 deletions

View file

@ -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

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -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}