| 1 |
\section{Protractor} |
| 2 |
Based on an idea by Yves Combe, the following macro allows you to draw a protractor. |
| 3 |
The operating principle is even simpler. Just name a half-line (a ray). The protractor will be placed on the origin $O$, the direction of the half-line is given by $A$. The angle is measured in the direct direction of the trigonometric circle. |
| 4 |
\subsection{The macro \tkzcname{tkzProtractor}} % (fold) |
| 5 |
\label{sub:the_macro_tkzcname_tkzprotractor} |
| 6 |
|
| 7 |
% subsection the_macro_tkzcname_tkzprotractor (end) |
| 8 |
\begin{NewMacroBox}{tkzProtractor}{\oarg{local options}\parg{$O,A$}}% |
| 9 |
\begin{tabular}{lll}% |
| 10 |
options & default & definition \\ |
| 11 |
\midrule |
| 12 |
\TOline{lw} {0.4 pt} {line thickness} |
| 13 |
\TOline{scale} {1} {ratio: adjusts the size of the protractor} |
| 14 |
\TOline{return} {false} {trigonometric circle indirect} |
| 15 |
\end{tabular} |
| 16 |
\end{NewMacroBox} |
| 17 |
|
| 18 |
\subsubsection{The circular protractor} |
| 19 |
Measuring in the forward direction |
| 20 |
|
| 21 |
\begin{tkzexample}[latex=7cm,small] |
| 22 |
\begin{tikzpicture}[scale=.5] |
| 23 |
\tkzDefPoint(2,0){A}\tkzDefPoint(0,0){O} |
| 24 |
\tkzDefShiftPoint[A](31:5){B} |
| 25 |
\tkzDefShiftPoint[A](158:5){C} |
| 26 |
\tkzDrawPoints(A,B,C) |
| 27 |
\tkzDrawSegments[color = red, |
| 28 |
line width = 1pt](A,B A,C) |
| 29 |
\tkzProtractor[scale = 1](A,B) |
| 30 |
\end{tikzpicture} |
| 31 |
\end{tkzexample} |
| 32 |
|
| 33 |
\subsubsection{The circular protractor, transparent and returned} |
| 34 |
|
| 35 |
\begin{tkzexample}[latex=7cm,small] |
| 36 |
\begin{tikzpicture}[scale=.5] |
| 37 |
\tkzDefPoint(2,3){A} |
| 38 |
\tkzDefShiftPoint[A](31:5){B} |
| 39 |
\tkzDefShiftPoint[A](158:5){C} |
| 40 |
\tkzDrawSegments[color=red,line width=1pt](A,B A,C) |
| 41 |
\tkzProtractor[return](A,C) |
| 42 |
\end{tikzpicture} |
| 43 |
\end{tkzexample} |
| 44 |
\endinput |