I would like to illustrate lecture notes on complex analysis, which by its nature is a lot about how the lines of integration are running through the complex plane. However, I'm having trouble finding a proper solution with tikz
to do so.
Take for example the following diagram, which should become a path coming from the upper right middle, then joining the circle, exiting at the lower right middle again:
\tikz{
\draw[help lines] (-2,-2) grid (2,2);
\draw (0, 0.1) -- (2, 0.1);
\draw (0,-0.1) -- (2,-0.1);
\draw (0,0) circle (1);
}
I would now like to cut out the shapes that do not belong to the individual paths, so that it becomes something like
- I've been looking for something like
\clip[inverse]
, but that apparently that doesn't exist. - I also tried calculating the intersections by hand (i.e. Mathematica) to and then using arcs and other nasty things to do the trick, but after a few diagrams I thought this can't be it.
- The
tikz
manual didn't help (which is surprising to be honest). Am I overlooking some feature that does what I want?
Problem solved, basically using an inverse clipping technique. See my response below.