tikz.dev / tkz-euclide Manual

tkz-euclide

Complements

40 Protractor

Based on an idea of Yves Combe, the following macro draws a protractor. The principle is simple: just name a ray. The protractor is placed at its origin \(O\), and the direction of the ray is given by \(A\). The angle is measured counterclockwise; with the option return, the protractor is reversed and the angle is measured clockwise.

40.1 The macro \tkzProtractor
  • \tkzProtractor[⟨local options⟩](⟨\(O,A\)⟩)

  • optionsdefaultdefinition
    lw0.4 ptline thickness
    scale1ratio: adjusts the size of the protractor
    returnfalsetrigonometric circle indirect
40.1.1 The circular protractor

Measuring counterclockwise:

Compiled output

\begin{tikzpicture}[scale=.5]
\tkzDefPoint(2,0){A}\tkzDefPoint(0,0){O}
\tkzDefShiftPoint[A](31:5){B}
\tkzDefShiftPoint[A](158:5){C}
\tkzDrawPoints(A,B,C)
\tkzDrawSegments[color = red,
line width = 1pt](A,B A,C)
\tkzProtractor[scale = 1](A,B)
\end{tikzpicture}
40.1.2 The circular protractor, transparent and returned

Compiled output

\begin{tikzpicture}[scale=.5]
\tkzDefPoint(2,3){A}
\tkzDefShiftPoint[A](31:5){B}
\tkzDefShiftPoint[A](158:5){C}
\tkzDrawSegments[color=red,line width=1pt](A,B A,C)
\tkzProtractor[return](A,C)
\end{tikzpicture}