TikZ 图中某条边不与其他边交叉

TikZ 图中某条边不与其他边交叉

下面的代码

\documentclass{article}

\usepackage{tkz-berge}
%\usepackage{tkz-graph}


\usepackage{comment}
%\usepackage{polski}
\usepackage[cp1250]{inputenc}

\usetikzlibrary{positioning}

\textwidth16cm
\begin{document}

\def\kob{circle (3pt)} % kółko białe
\def\koc{circle (3pt)} % kółko czarne do \filldraw[black]

\def\ticircw{\tikzset{VertexStyle/.style = {
shape = circle,
fill = black,
inner sep = 0pt,
outer sep = 0pt,
%minimum size = 8pt,
minimum size = 0pt,
draw}}
}

\begin{tikzpicture}
\tikzset{VertexStyle/.style = {
shape = circle,
fill = black,
inner sep = 0pt,
outer sep = 0pt,
%minimum size = 8pt,
minimum size = 0pt,
draw}}
  \SetVertexNoLabel
%\grEmptyPath[Math,prefix=p,RA=2,RS=0]{5}
%\grEmptyPath[Math,prefix=q,RA=2,RS=3]{5}
\grPath[Math,prefix=p,RA=0.5,RS=0]{6}
\begin{scope}[xshift=1.25 cm]
\grPath[Math,prefix=q,RA=1,RS=1.73]{1}
\grPath[Math,prefix=n,RA=1,RS=-1.73]{1}
%\EdgeFromOneToAll{r}{q}{0}{4}
\Edges(q0,p0,n0,p1,q0,p2,n0,p3,q0,p4,n0,p5,q0);
\Edge[style={bend right=120}](p0)(p5)
\draw[fill=white] (p0)\kob;
\filldraw[black] (p1)\koc;
\draw[fill=white] (p2)\kob;
\filldraw[black] (p3)\koc;
\draw[fill=white] (p4)\kob;
\filldraw[black] (p5)\koc;
\filldraw[black] (q0)\koc;
\draw[fill=white](n0)\kob;

%\draw[fill=white] (p2)\kob;
%\draw[fill=white] (q3)\kob;
\end{scope}
\end{tikzpicture}

\end{document}

给出 在此处输入图片描述

(黑色部分)。

是否有任何标准的可能性可以将黑色曲线更改为不穿过边缘的曲线,就像红色曲线一样?

答案1

更新:我忽略了这些是坐标而不是节点的事实,并使用了 Przemysław Scherwentke 的评论中的参数,并使代码更精简(感谢@cfr)。

在此处输入图片描述

\documentclass{article}
\usepackage{tkz-berge}
\usepackage[cp1250]{inputenc}

\usetikzlibrary{positioning}

\textwidth16cm
\begin{document}
\begin{tikzpicture}
\tikzset{VertexStyle/.style = {
shape = circle,
fill = black,
inner sep = 0pt,
outer sep = 0pt,
%minimum size = 8pt,
minimum size = 0pt,
draw}}
\def\kob{circle (3pt)}
\def\koc{circle (3pt)}
  \SetVertexNoLabel
\grPath[Math,prefix=p,RA=0.5,RS=0]{6}
\begin{scope}[xshift=1.25 cm]
\grPath[Math,prefix=q,RA=1,RS=1.73]{1}
\grPath[Math,prefix=n,RA=1,RS=-1.73]{1}
\Edges(q0,p0,n0,p1,q0,p2,n0,p3,q0,p4,n0,p5,q0);
\coordinate (b0) at ([yshift=-15pt]n0);
\draw[blue,thick] (p0) to [out=-105,in=180] (b0) to [out=0,in=-75] (p5);
\draw[fill=white] (p0)\kob;
\filldraw[black] (p1)\koc;
\draw[fill=white] (p2)\kob;
\filldraw[black] (p3)\koc;
\draw[fill=white] (p4)\kob;
\filldraw[black] (p5)\koc;
\filldraw[black] (q0)\koc;
\draw[fill=white](n0)\kob;
\end{scope}
\end{tikzpicture}
\end{document}

相关内容