Debian Codegraph @

texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex

raw
1 % !TeX root = tikz-ext-manual.tex
2 % !TeX spellcheck = en_US
3 % Copyright 2022 by Qrrbrbirlbel
4 %
5 % This file may be distributed and/or modified
6 %
7 % 1. under the LaTeX Project Public License and/or
8 % 2. under the GNU Free Documentation License.
9 %
10
11 \section{Arcs through Three Points}
12 \label{library:topaths.arcthrough}
13 \begin{tikzlibrary}{ext.topaths.arcthrough}
14 This library allows to use an arc defined by three points.
15 \end{tikzlibrary}
16
17 \begin{codeexample}[width=10cm,preamble=\usetikzlibrary{ext.topaths.arcthrough}]
18 \begin{tikzpicture}
19 \coordinate[label=above right:$A$] (A) at ( 3, 1);
20 \coordinate[label=above:$B$] (B) at ( 1, 2);
21 \coordinate[label=below left:$C$] (C) at (-2,-2);
22
23 \draw[ultra thick, draw=green, fill=green!50]
24 (B) to[ext/arc through={clockwise, (A)}] (C)
25 -- (arc through center) -- cycle;
26 \draw[ultra thick, draw=blue, fill=blue!50]
27 (B) to[ext/arc through=(A)] (C)
28 -- (arc through center) -- cycle;
29
30 \foreach \p in {A, B, C, arc through center}
31 \fill[red] (\p) circle[radius=2pt];
32 \end{tikzpicture}
33 \end{codeexample}
34
35 This can only by used for circles in the |canvas| coordinate system.
36
37 \begin{multicols}{2}
38 \begin{key}{/\tikzext/arc through/through=\meta{coordinate} (initially {(0,0)})}\keycompat{tikz/arc through}
39 The coordinate on the circle that defines~-- together with the
40 starting and target point~-- a circle.
41 \end{key}
42
43 \begin{key}{/\tikzext/arc through/center suffix=\meta{suffix} (initially {})}\keycompat{tikz/arc trough}
44 The |arc through| will define a coordinate named |arc through center|\meta{suffix}
45 so that it can be referenced later.
46 \end{key}
47
48 \begin{key}{/\tikzext/arc through/clockwise}\keycompat{tikz/arc trough}
49 The resulting arc will go clockwise from the starting point to the target point.
50 This will not necessarily go through the |through| point.
51 \end{key}
52
53 \begin{key}{/\tikzext/arc through/counter clockwise}\keycompat{tikz/arc trough}
54 The resulting arc will go counter clockwise from the starting point to the target point.
55 This will not necessarily go through the |through| point.
56 \end{key}
57
58 \begin{key}{/\tikzext/arc through=\meta{key-value}}\keycompat{tikz/arc trough}
59 This key should be used with |to|\indexPathOperationO{to} or |edge|\indexPathOperationO{edge}.
60 A parameter other than |center suffix|, |clockwise| or |counter clockwise| will
61 be assumed to be the |through| coordinate.
62 \end{key}
63 \end{multicols}
64 \endinput