I have been trying to find a good answer to this question (or a question to match it): I'm trying to give an angle a marking with multiple arcs in the interior, as per the pictures below.
I'm not concerned with fill color, or anything else like that: is there a relatively simple way to mark an angle with more than one arc? So far, I haven't found anything in the decorations library, and the arc and style parameters on \tkzMarkAngle don't seem to work (at least, not very reliably). Am I missing anthing?
2 Answers
An ad hoc possibility is to use the angles
library and then double
for the double line and just to add a single arc for triple lines.
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{angles}
\begin{document}
\begin{tikzpicture}[double arc/.style={double,double distance=2pt},
triple arc/.style={double distance=4pt,
pic actions/.append code=\tikzset{postaction={draw}}}]
\draw
(2,0) coordinate (A) -- (0,0) coordinate (B)
-- (1,1) coordinate (C)
pic [draw,double arc,angle radius=1cm] {angle=A--B--C};
\begin{scope}[xshift=4cm]
\draw
(2,0) coordinate (A) -- (0,0) coordinate (B)
-- (1,1) coordinate (C)
pic [draw,triple arc,angle radius=1cm] {angle=A--B--C};
\end{scope}
\end{tikzpicture}
\end{document}
-
Yes
angle
pic usepic actions
that do not includepreaction
andpostaction
. And this is normal because there are two paths, one filled and the other drawn, so to which one the preaction should be applied ?– KpymNov 2, 2018 at 15:09 -
@Kpym Yes.
angles
also adds a.center
to the middle coordinates. One may improve it in a few ways.– user121799Nov 2, 2018 at 15:20
It is possible to use the macro \tkzMarkAngle
of the tkz-euclide
package.
It is not documented in the manual which is written in French but by looking at the sources .../tex/latex/tkz-euclide
we find this:
% \tkzMarkAngle(B, A, C)
%
% Angle mark
% arc of circle (single/double/triple) and equality mark.
%
% By default:
% arc = simple
% length = 1cm (arc radius)
% style solid lines
% position: 0.5 (mark position)
% mark nothing at all (ignored if type is used)
%
% Parameters (optional)
% arc: l, ll, lll
% length: 1cm
% gap : 2pt
% style: type of lines
% type : none, |, ||, |||, z, s, x, o, oo
% position: 0.5
% mark : none, |, ||, |||, z, s, x, o, oo but all
% % % tikz symbols are allowed
I must say that I did not fully understand the use of all the parameters. Here is an example of a code:
\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}[scale=2]
\tkzDefPoint(0,0){O}
\tkzDefPoint(2,-1){A}
\tkzDefPoint(2,2){B}
\tkzDefPointsBy[symmetry=center O](B,A){}
\tkzDrawLine(A,A')
\tkzDrawLine(B,B')
\tkzDrawPoints(O,A,B,A',B')
\tkzLabelPoints[below](O)
\tkzLabelPoints(B,B')
\tkzLabelPoints[below left](A,A')
\tkzMarkAngle[mark=s,arc=l,type=||,size=2 cm,mkcolor=red](A,O,B)
\tkzMarkAngle[mark=||,arc=ll,size=1.5 cm,mkcolor=red](B,O,A')
\tkzMarkAngle[mark=s,arc=l,type=||,size=2 cm,mkcolor=red](A',O,B')
\tkzMarkAngle[mark=||,arc=ll,size=1.5 cm,mkcolor=red](B',O,A)
\end{tikzpicture}
\end{document}
And the result: