diff --git a/tikz/parallelogram-triangle-area/Makefile b/tikz/parallelogram-triangle-area/Makefile new file mode 100644 index 0000000..58a272f --- /dev/null +++ b/tikz/parallelogram-triangle-area/Makefile @@ -0,0 +1,33 @@ +SOURCE = parallelogram-triangle-area +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)1.svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE)1.svg --export-width=$(WIDTH) --export-plain-svg=$(SOURCE)1.svg + rsvg-convert -a -w 720 -f svg $(SOURCE)1.svg -o $(SOURCE).svg + rm $(SOURCE)1.svg \ No newline at end of file diff --git a/tikz/parallelogram-triangle-area/README.md b/tikz/parallelogram-triangle-area/README.md new file mode 100644 index 0000000..593a2f9 --- /dev/null +++ b/tikz/parallelogram-triangle-area/README.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](parallelogram-triangle-area.png) diff --git a/tikz/parallelogram-triangle-area/parallelogram-triangle-area.png b/tikz/parallelogram-triangle-area/parallelogram-triangle-area.png new file mode 100644 index 0000000..d3dc29b Binary files /dev/null and b/tikz/parallelogram-triangle-area/parallelogram-triangle-area.png differ diff --git a/tikz/parallelogram-triangle-area/parallelogram-triangle-area.tex b/tikz/parallelogram-triangle-area/parallelogram-triangle-area.tex new file mode 100644 index 0000000..bf909fc --- /dev/null +++ b/tikz/parallelogram-triangle-area/parallelogram-triangle-area.tex @@ -0,0 +1,57 @@ +\documentclass{article} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usepackage{tkz-euclide} +\usetikzlibrary{angles,quotes} + +\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(4,0){B} + \tkzDefPoint(5,3){C} + \tkzDefPoint(1,3){D} + \tkzDefPoint(1,0){E} + + % \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,D) + + % \tkzMarkAngle[arc=l,size=0.6cm,fill=red!30](C,B,A) + % \tkzLabelAngle[pos=0.4](C,B,A){$\beta$} + + % \tkzMarkAngle[arc=l,size=0.6cm,fill=blue!30](A,C,B) + % \tkzLabelAngle[pos=0.4](A,C,B){$\gamma$} + + % Label lines + \tkzLabelSegment[below](A,B){$a$} + \tkzLabelSegment[left](A,D){$b$} + % \tkzLabelSegment[right](B,C){$a$} + + % Draw polygon + \tkzDrawPolygon[fill=blue!30](A,B,D) + + % Mark angles + \tkzMarkAngle[arc=l,size=0.6cm,fill=green!30](B,A,D) + \tkzLabelAngle[pos=0.3](B,A,D){$\gamma$} + + % Draw polygon + \tkzDrawPolygon[thick](A,B,C,D) + + \tkzDrawSegment[dashed](D,E) + \tkzLabelSegment[right](D,E){$h$} + + \draw[thin] pic[draw, angle radius=2mm,"$\cdot$",angle eccentricity=.5]{angle=B--E--D}; +\end{tikzpicture} +\end{preview} +\end{document}