1

I am trying to create in tikz an image like this illustration of the winset of the Q in two-dimensional space (drawn in Inkscape).

enter image description here

The code below draws the circles as nodes, since that seems to be the easiest way to ensure they all go through the same arbitrary point Q (I am not for present purposes concerned about the labels for the circles) and comes close to what I want, but I would prefer a) no shading at all in the non-overlapping sections and b) darker shading in the overlapping sections. Any suggestions?

    \documentclass[11pt]{article}
\usepackage[english]{babel}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{amsfonts}
\usepackage{adjustbox}
\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{calc,matrix,decorations.pathreplacing,arrows.meta,patterns,decorations.markings,shapes,shapes.misc,positioning}
\usetikzlibrary{through,intersections}
\usepackage{graphicx}
\begin{document}
\begin{adjustbox}{max totalsize={\textwidth}{.9\textheight},center}
\begin{tikzpicture}
\node (q) [label=below:{Q},circle,fill=black,inner sep=0pt,minimum size=1pt] at (0,0) {\large\textbullet};
\node (a) [label=below:{A},circle,fill=black,inner sep=0pt,minimum size=1pt] at (3.5,3) {\large\textbullet};
\node (b)  [label=below:{B},circle,fill=black,inner sep=0pt,minimum size=1pt] at (-5.5,1) {\large\textbullet};
\node (c) [label=below:{C},circle,fill=black,inner sep=0pt,minimum size=1pt] at (1,-4.5) {\large\textbullet};
\begin{scope}[blend group=color burn]
\begin{scope}[blend group=multiply]
\node [draw,thick, fill=lightgray,fill opacity=.1] at (a) [circle through={(q)}] {};
\node [draw,thick, fill=lightgray,fill opacity=.1] at (b) [circle through={(q)}] {};
\node [draw,thick ,fill=lightgray,fill opacity=.1] at (c) [circle through={(q)}] {};
\end{scope}
\end{scope}
\end{tikzpicture}
\end{adjustbox}
\end{document}
William
  • 11
  • Use circle A to \clip and use circle B to \filldraw – Symbol 1 Oct 07 '21 at 19:11
  • https://tex.stackexchange.com/questions/228593/draw-ellipses-with-different-coloring-for-their-intersection-in-tikz – David Carlisle Oct 07 '21 at 19:38
  • 1
    Welcome to TeX.SE!! I'd also use \clips and perhaps this could be a start: https://tex.stackexchange.com/questions/614043/how-to-draw-diagram-of-circles-and-curves-with-pattern-filled-intersections-usi. – Juan Castaño Oct 07 '21 at 19:39

1 Answers1

2

This is a way to do it. I changed the circles, placing the centers around Q with polar coordinates so I know beforehand the radii of the circles. But you can do the \clips for the shaded parts also with your circles in the same way.

\documentclass[border=2mm,tikz]{standalone}
\usetikzlibrary{calc}

\begin{document} \begin{tikzpicture}[scale=2] \def\ra{1.5} % radius, circle A \def\rb{1.6} % radius, circle B \def\rc{1.4} % radius, circle C % coordinates \coordinate (Q) at (0,0); \coordinate (A) at (150:\ra); \coordinate (B) at (45:\rb); \coordinate (C) at (-65:\rc); % clips \begin{scope}[gray!50] \clip (A) circle (\ra); \fill (B) circle (\rb); \fill (C) circle (\rc); \end{scope} \begin{scope}[gray!50] \clip (B) circle (\rb); \fill (C) circle (\rc); \end{scope} % circles and centers \foreach\c/\r/\a in {A/\ra/110, B/\rb/135, C/\rc/180} % center/radius/angle for the label {% \draw (\c) circle (\r); \fill (\c) circle (0.025) node [above] {$\c$}; \node at ($(\c)+(\a:\r+0.25)$) {$I_\c(Q)$}; } \fill (Q) circle (0.025) node [below] {$Q$}; \end{tikzpicture} \end{document}

enter image description here

Juan Castaño
  • 28,426