Sfoglia il codice sorgente

added last image for menelaos

Martin Thoma 10 anni fa
parent
commit
b25f227dea

+ 31 - 0
tikz/triangle-menelaos-1-1/Makefile

@@ -0,0 +1,31 @@
+SOURCE = triangle-menelaos-1-1
+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

+ 3 - 0
tikz/triangle-menelaos-1-1/README.md

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

BIN
tikz/triangle-menelaos-1-1/triangle-menelaos-1-1.png


+ 53 - 0
tikz/triangle-menelaos-1-1/triangle-menelaos-1-1.tex

@@ -0,0 +1,53 @@
+\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(3.2,0){B}
+    \tkzDefPoint(4.5,0){Z}
+    \tkzDefPoint(0.7,3){C}
+    \tkzDefBarycentricPoint(A=1,C=2)\tkzGetPoint{X}
+    \tkzInterLL(B,C)(X,Z)\tkzGetPoint{Y}
+
+    \tkzDefLine[perpendicular=through A,K=1,/tikz/overlay](Y,Z)\tkzGetPoint{YZA}
+    \tkzInterLL(Y,Z)(A,YZA)\tkzGetPoint{YZA}
+    \tkzDefLine[perpendicular=through B,K=1,/tikz/overlay](Y,Z)\tkzGetPoint{YZB}
+    \tkzInterLL(Y,Z)(B,YZB)\tkzGetPoint{YZB}
+    \tkzDefLine[perpendicular=through C,K=1,/tikz/overlay](Y,Z)\tkzGetPoint{YZC}
+    \tkzInterLL(Y,Z)(C,YZC)\tkzGetPoint{YZC}
+
+    \tkzLabelPoints[below left,font=\sansmath\sffamily](A)
+    \tkzLabelPoints[below right,font=\sansmath\sffamily](B)
+    \tkzLabelPoints[above,font=\sansmath\sffamily](C)
+    \tkzLabelPoints[below left,font=\sansmath\sffamily](X)
+    \tkzLabelPoints[above,font=\sansmath\sffamily](Z)
+    \tkzLabelPoints[above,font=\sansmath\sffamily](Y)
+
+    % Draw polygon
+    \tkzDrawPolygon[thick,fill=gray!10](A,B,C)
+
+    % Draw polygon
+    \tkzDrawPolygon[thick](A,B,C)
+
+    \tkzDrawSegments[thick,color=blue](A,YZA B,YZB C,YZC)
+    \tkzDrawLines[thick](A,Z)
+    \tkzDrawLines[thick,color=red](Z,X)
+
+    \tkzLabelSegment[right=-0.1,color=blue](A,YZA){a}
+    \tkzLabelSegment[right=-0.01,color=blue](B,YZB){b}
+    \tkzLabelSegment[left=-0.1,color=blue](C,YZC){c}
+
+    \tkzDrawPoints[color=black,shape=circle,fill=black,size=2](A,B,C,X,Y,Z,YZA,YZB,YZC)
+\end{tikzpicture}
+\end{preview}
+\end{document}