von cgnieder » Sa 31. Aug 2013, 19:55
tkz-euclide ist in der Tat wie gemacht für Geometrie. In der Tat bin ich sicher, dass der Entwickler es im Hinblick auf Matheunterricht entwickelt hat. Damit eignet es sich zwar nicht, um TikZ zu üben, aber für Geometrie ist es super. Ist, als ob man mit Lineal und Zirkel arbeiten würde
\documentclass[a4paper,10pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\colorlet{lightgray}{black!10}
\colorlet{pencil}{black!25}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
% Größe des Bilds, Gitter:
\tkzInit[ymax=6]
\tkzClip
\tkzGrid[color=lightgray,sub,subxstep=.5,subystep=.5]
% Punkte A und B, 8cm entfernt:
\tkzDefPoint(1,1){A}
\tkzDefShiftPoint[A](8,0){B}
% Kreis um die Mitte schlagen:
\tkzDefMidPoint(A,B)\tkzGetPoint{Mab}
\tkzDrawArc[color=pencil](Mab,B)(A)
% auf 20% der Strecke AB eine senkrechte Konstruieren
% und Schnittpunkt C mit Kreis ermitteln:
\tkzDefPointWith[K=.2](A,B)\tkzGetPoint{C'}
\tkzDefPointWith[orthogonal](C',B)\tkzGetPoint{C''}
\tkzInterLC(C',C'')(Mab,B)\tkzGetSecondPoint{C}
% Dreieck zeichnen, mit Höhe auf AB:
\tkzDrawPoints(A,B,C)
\tkzDrawSegments(A,B B,C C,A C',C)
% Beschriftungen:
\tkzLabelSegment[below](A,B){$c$}
\tkzLabelSegment[above right](B,C){$a$}
\tkzLabelSegment[above left](C,A){$b$}
\tkzLabelSegment[right](C',C){$h$}
\tkzLabelPoint[below left](A){$A$}
\tkzLabelPoint[below right](B){$B$}
\tkzLabelPoint[above](C){$C$}
\tkzMarkAngle(B,A,C)
\tkzLabelAngle[pos=.5](B,A,C){$\alpha$}
\tkzMarkAngle(C,B,A)
\tkzLabelAngle[pos=.85](C,B,A){$\beta$}
\end{tikzpicture}
\end{document}
[url=http://www.ctan.org/pkg/tkz-euclide]tkz-euclide[/url] ist in der Tat wie gemacht für Geometrie. In der Tat bin ich sicher, dass der Entwickler es im Hinblick auf Matheunterricht entwickelt hat. Damit eignet es sich zwar nicht, um TikZ zu üben, aber für Geometrie ist es super. Ist, als ob man mit Lineal und Zirkel arbeiten würde :)
[code]\documentclass[a4paper,10pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\colorlet{lightgray}{black!10}
\colorlet{pencil}{black!25}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
% Größe des Bilds, Gitter:
\tkzInit[ymax=6]
\tkzClip
\tkzGrid[color=lightgray,sub,subxstep=.5,subystep=.5]
% Punkte A und B, 8cm entfernt:
\tkzDefPoint(1,1){A}
\tkzDefShiftPoint[A](8,0){B}
% Kreis um die Mitte schlagen:
\tkzDefMidPoint(A,B)\tkzGetPoint{Mab}
\tkzDrawArc[color=pencil](Mab,B)(A)
% auf 20% der Strecke AB eine senkrechte Konstruieren
% und Schnittpunkt C mit Kreis ermitteln:
\tkzDefPointWith[K=.2](A,B)\tkzGetPoint{C'}
\tkzDefPointWith[orthogonal](C',B)\tkzGetPoint{C''}
\tkzInterLC(C',C'')(Mab,B)\tkzGetSecondPoint{C}
% Dreieck zeichnen, mit Höhe auf AB:
\tkzDrawPoints(A,B,C)
\tkzDrawSegments(A,B B,C C,A C',C)
% Beschriftungen:
\tkzLabelSegment[below](A,B){$c$}
\tkzLabelSegment[above right](B,C){$a$}
\tkzLabelSegment[above left](C,A){$b$}
\tkzLabelSegment[right](C',C){$h$}
\tkzLabelPoint[below left](A){$A$}
\tkzLabelPoint[below right](B){$B$}
\tkzLabelPoint[above](C){$C$}
\tkzMarkAngle(B,A,C)
\tkzLabelAngle[pos=.5](B,A,C){$\alpha$}
\tkzMarkAngle(C,B,A)
\tkzLabelAngle[pos=.85](C,B,A){$\beta$}
\end{tikzpicture}
\end{document}[/code]