I want to draw an arc with a given radius from the point the arc intersects with a given circle to the point where the arc intersects with another circle. I have been reading through a lot of the TikZ manual, but to no avail. Can anyone help?
This PDF (http://www.mycroft.ch/tikztest.pdf) (MWE below) is intended to illustrate the problem. There are four circles, a part of each I want to use as path. The resulting curved wedge is then to be filled in black.
The green arc is no problem, I have start angle and end angle for it. For the two orange arcs I only have one angle (the one near the red circle is just an estimate). For the red arc I have nothing (both ends are estimates, thought to illustrate).
Interestingly, I can calculate the intersections (marked by the red circles), but I cannot fathom how to draw an arc there.
Hopefully I am overlooking something incredibly obvious! Thanks.
\documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections,scopes} \tikzset{ pics/carc/.style args={#1:#2:#3}{ code={ \draw[pic actions] (#1:#3) arc(#1:#2:#3); } } } \begin{document} \begin{tikzpicture} \draw [name path=three] (120:1.06) circle (1.9); \draw [name path=four] (0:1.06) circle (2.12); \draw [name path=five] (0:0.77) circle (2.41); \draw [name path=two] (0:0) circle (1.06); \draw[green, thick] (0:3.18) arc [radius=2.12, start angle=0, end angle=180]; \draw[orange, thick] (0:3.18) arc [radius=2.41, start angle=0, end angle=197]; \draw[orange, thick] (180:1.06) arc [radius=1.06, start angle=180, end angle=245]; \draw[red, thick, name intersections={of=five and three}] (intersection-2) circle (2pt) node {}; \draw[red, thick, name intersections={of=two and three}] (intersection-1) circle (2pt) node {}; { [xshift=-0.53cm,yshift=0.918cm] \pic [red,thick] {carc=238:274:1.9}; } \end{tikzpicture} \end{document}
xshifts
andyshifts
options?\clip[draw] (center) -- ($(center)!2.5!(A)$) -- ($(center)!2.5!(B)$) -- cycle;
. I added coordinates to your intersections:\draw[red, thick, name intersections={of=five and three}] (intersection-2) circle (2pt) node[below] {$A$} coordinate (A)
, did the same for(B)
and defined(center)
with\coordinate (center) at (120:1.06);
. Wrap the clip in a scope env., along with\draw [red,thick] (120:1.06) circle (1.9);
for the arc. This is just an example with a clip, but obviously this solution is not very nice as you have to adapt the clip to your draw every time.