2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00

tikz/triangle-gergonne-point: added

This commit is contained in:
Martin Thoma 2014-12-19 07:25:59 +01:00
parent 27f3331744
commit e041403672
4 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,31 @@
SOURCE = triangle-gergonne-point
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:
#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-gergonne-point.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -0,0 +1,47 @@
\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{shapes, calc, decorations}
\usepackage{amsmath,amssymb}
\usepackage{helvet}
\usepackage[eulergreek]{sansmath}
\begin{document}
\begin{preview}
\begin{tikzpicture}[very thick,font=\sansmath\sffamily]
\tkzDefPoint(0,0){A}
\tkzDefPoint(6,0){B}
\tkzDefPoint(1,4){C}
\tkzLabelPoints[below left,font=\sansmath\sffamily](A)
\tkzLabelPoints[below right,font=\sansmath\sffamily](B)
\tkzLabelPoints[above,font=\sansmath\sffamily](C)
% Draw polygon
\tkzDrawPolygon[thick,fill=gray!10](A,B,C)
% Draw polygon
\tkzDrawPolygon[thick](A,B,C)
\tkzDefCircle[in,/tikz/overlay](A,B,C) \tkzGetPoint{Ocircle}\tkzGetLength{dOcircle}
\tkzDrawCircle[R](Ocircle,\dOcircle pt)
\tkzInterLC[R,/tikz/overlay](B,C)(Ocircle,\dOcircle pt)\tkzGetPoints{X}{X2}
\tkzInterLC[R,/tikz/overlay](A,C)(Ocircle,\dOcircle pt)\tkzGetPoints{Y}{Y2}
\tkzInterLC[R,/tikz/overlay](A,B)(Ocircle,\dOcircle pt)\tkzGetPoints{Z}{Z2}
\tkzInterLL(A,X)(B,Y)\tkzGetPoint{G}
\tkzDrawSegments[dashed](A,X B,Y C,Z)
\tkzDrawPoints[size=2,fill=black](Ocircle,X,Y,Z)
\tkzDrawPoints[size=2,fill=red,color=red](G)
\tkzLabelPoints[above right,font=\sansmath\sffamily](X)
\tkzLabelPoints[left,font=\sansmath\sffamily](Y)
\tkzLabelPoints[below,font=\sansmath\sffamily](Z)
\tkzLabelPoints[red,above left,font=\sansmath\sffamily](G)
\end{tikzpicture}
\end{preview}
\end{document}