Редактировать

Редактировать

Вот пример документа и результат, который я получаю из него.

\documentclass[convert={size=480}]{standalone}

\usepackage{tikz}

\tikzset{ little circle/.style = { fill = black,
                                   shape = circle,
                                   minimum size = 1.5mm,
                                   inner sep = 0mm,
                                   outer sep = 0mm},
          concentric circles/.style = {draw = gray!90, very thick}}

\begin{document}

\begin{tikzpicture}
    \def\concentriccircles{\foreach \r in {1.5, ..., 19} {circle (\r mm)};}
    \foreach \name/\x/\y in {A/8/30, B/16/-24, C/-30/8} {
        \node [little circle] (\name) at (\x mm, \y mm) {};
    }
    \node [little circle] (P) at (barycentric cs:A=1,B=1,C=1) {};
    \foreach \name/\origin/\destination in {H/A/B, J/B/C, K/C/A} {
        \path (\origin) -- (\destination) coordinate [midway] (\name);
        \path (P) -- (\name) node [pos = 1.6, little circle] (\name 2) {};
    }
    \draw [concentric circles] (P) \concentriccircles;
    \foreach \x/\y/\v/\c in {A/B/H/green, B/C/J/red, C/A/K/blue} {
        \begin{scope}
            \clip (\x) .. controls (P) .. (\y) -- (\v 2) -- (\x); % (*)
            \draw [concentric circles, draw = \c] (P) \concentriccircles;
        \end{scope}
    }
    \begin{scope}[very thick]
        \foreach \x/\y/\c in {A/B/red, B/C/blue, C/A/green} {
            \draw [\c] (\x) .. controls (P) .. (\y);
        }
    \end{scope}
    \begin{scope}[very thick, red]
        \path [use as bounding box];
        \clip (A) circle [radius = 25mm];
        \draw (A) .. controls (P) .. (B);
    \end{scope}
\end{tikzpicture}

\end{document}

Я не понимаю, почему область обрезки исключает треугольник (A, B, H2)( (B, C, J2)и (C, A, K2)). Вы можете видеть, что это так, потому что концентрические круги за линией между A и B (B и C, C и A) все еще серые.

Редактировать

Вот как это будет выглядеть, если добавить drawопцию к \clipкоманде at (*).

решение1

Если вы создаете путь с узлами, TikZ разрезает этот путь на несколько сегментов, чтобы избежать содержимого узлов.

Чтобы построить замкнутый контур обрезки, используйте координаты вместо узлов... или используйте \x.center, \y.center, \v 2.center, и т. д.

введите описание изображения здесь

\documentclass[convert={size=480}]{standalone}

\usepackage{tikz}

\tikzset{ little circle/.style = { fill = black,
                                   shape = circle,
                                   minimum size = 1.5mm,
                                   inner sep = 0mm,
                                   outer sep = 0mm},
          concentric circles/.style = {draw = gray!90, very thick}}

\begin{document}

\begin{tikzpicture}
    \def\concentriccircles{\foreach \r in {1.5, ..., 19} {circle (\r mm)};}
    \foreach \name/\x/\y in {A/8/30, B/16/-24, C/-30/8} {
        \node [little circle] (\name) at (\x mm, \y mm) {};
    }
    \node [little circle] (P) at (barycentric cs:A=1,B=1,C=1) {};
    \foreach \name/\origin/\destination in {H/A/B, J/B/C, K/C/A} {
        \path (\origin) -- (\destination) coordinate [midway] (\name);
        \path (P) -- (\name) node [pos = 1.6, little circle] (\name 2) {};
    }
    \draw [concentric circles] (P) \concentriccircles;
    \foreach \x/\y/\v/\c in {A/B/H/green, B/C/J/red, C/A/K/blue} {
        \begin{scope}
            \clip (\x.center) .. controls (P.center) .. (\y.center)
            -- (\v 2.center) -- cycle; % (*)
            \draw [concentric circles, draw = \c] (P) \concentriccircles;
        \end{scope}
    }
    \begin{scope}[very thick]
        \foreach \x/\y/\c in {A/B/red, B/C/blue, C/A/green} {
            \draw [\c] (\x) .. controls (P) .. (\y);
        }
    \end{scope}
    \begin{scope}[very thick, red]
        \path [use as bounding box];
        \clip (A) circle [radius = 25mm];
        \draw (A) .. controls (P) .. (B);
    \end{scope}
\end{tikzpicture}

\end{document}

Связанный контент