diff --git a/tikz/triangle-sws/Makefile b/tikz/triangle-sws/Makefile new file mode 100644 index 0000000..cd56300 --- /dev/null +++ b/tikz/triangle-sws/Makefile @@ -0,0 +1,31 @@ +SOURCE = triangle-sws +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 diff --git a/tikz/triangle-sws/README.md b/tikz/triangle-sws/README.md new file mode 100644 index 0000000..b1f4fa9 --- /dev/null +++ b/tikz/triangle-sws/README.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](triangle-sws.png) diff --git a/tikz/triangle-sws/triangle-sws.png b/tikz/triangle-sws/triangle-sws.png new file mode 100644 index 0000000..1567be3 Binary files /dev/null and b/tikz/triangle-sws/triangle-sws.png differ diff --git a/tikz/triangle-sws/triangle-sws.tex b/tikz/triangle-sws/triangle-sws.tex new file mode 100644 index 0000000..be96fda --- /dev/null +++ b/tikz/triangle-sws/triangle-sws.tex @@ -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(3.2,0){B} + \tkzDefPoint(0.7,3){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) + + % Mark angles + \tkzMarkAngle[arc=l,size=0.6cm,fill=red!30](B,A,C) + \tkzLabelAngle[pos=0.3](B,A,C){$\alpha$} + + \tkzMarkAngle[arc=l,size=0.6cm,fill=blue!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){$c$} + \tkzLabelSegment[left](A,C){$b$} + \tkzLabelSegment[right](B,C){$a$} + + % Draw polygon + \tkzDrawPolygon[thick](A,B,C) + + \tkzDrawSegments[very thick,red](A,B A,C) +\end{tikzpicture} +\end{preview} +\end{document}