使用贝塞尔曲线创建流程图

使用贝塞尔曲线创建流程图

我该如何使用 TikZ 制作此图表?我也想使用贝塞尔曲线代替直线。

在此处输入图片描述

谢谢

答案1

我对基督教的了解很少,所以我对这个边缘问题不太了解。我会用我有限的流行文化知识来代替,就这样;我会点击那个按钮,然后期待几道闪电(不过,考虑到上帝如果愿意的话也是一个瞄准机器人,一道就足够了)。

\documentclass[tikz]{standalone}
%\usepackage{god3} % Hoped to have a LaTeX3 solution, didn't work
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[every node/.style={align=center,circle,draw,minimum size=2cm}]
\node (f) at (3,5) {Marlon\\Brando};
\node (s) at (0,0) {Al\\Pacino};
\node (p) at (6,0) {Vodka};
\node (g) at ($(s)!0.5!(p)!0.3333!(f)$) {Morgan\\Freeman};

\foreach \x[remember=\x as \xi (initially f),count=\xc from 1] in {s,p,f}{
\draw (g) -- (\x) node[midway,draw=none,minimum size=1mm,fill=white] {IS};
\draw (\x) to[out={\xc*135},in={(\xc*120}] node[midway,draw=none,minimum size=1mm,fill=white] {IS\\NOT}(\xi);
}
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

\documentclass[preview,border=2cm]{standalone}
\usepackage{pst-node}
\def\Box#1{\parbox[b]{15mm}{\centering #1}}

\begin{document}
\large
\begin{psmatrix}[colsep=10mm,rowsep=17.3mm,mnode=Circle,radius=12mm,arrowscale=2]
    & [name=b] \Box{The\\Boss} \\
    &  [name=g] \Box{Ghost}\\   
    [name=t] \Box{The\\TikZ} & & [name=h] \Box{The\\Holy\\PSTricks}
    \ncarc[arcangle=45]{<-}{t}{b}\naput[nrot=:U]{does not like}
    \ncarc[arcangle=45]{->}{b}{h}\naput[nrot=:U]{likes}
    \ncarc[arcangle=-45]{t}{h}
    \ncline{<-}{t}{g}\naput[nrot=:U]{likes}
\end{psmatrix}
\end{document}

在此处输入图片描述

答案3

编译自lualatex

\RequirePackage{luatex85}
\documentclass[tikz,border=10pt]{standalone}

\usepackage{tikz}
\usepackage{currfile}
\usepackage{pgf}

\usetikzlibrary{graphdrawing}
\usetikzlibrary{graphs}
\usetikzlibrary{quotes}
\usegdlibrary{trees}
\usegdlibrary{circular}

\begin{document}

\begin{tikzpicture}[rounded corners]
    \graph [simple necklace layout,
    edge quotes mid,
    edges={nodes={font=\scriptsize, fill=white, sloped, inner sep=1pt}}]
     {
         Father[nail at={(0,3)}] <->["is", blue, text=black] God[nail at={(0,0)}];
         Son[nail at={(-3,-2)}] <->["is", blue, text=black] God;
         Holy Ghost[nail at={(3,-2)}] <->["is", blue, text=black] God;
         Father <->["is not", red, text=black] Son <->["is not", red, text=black] Holy Ghost <->["is not", red, text=black] Father;
         Father -> ["paternity", bend right=22.5, green, text=black] Son;
         Son -> ["filiation", bend left=45, green, text=black] Father;
         Father -> ["active spiration", bend left=22.5, green, text=black] Holy Ghost;
         Holy Ghost -> ["passive spiration", bend right=45, green, text=black] Father;
         Holy Ghost -> ["passive spiration", bend left=45, green, text=black] Son;
         Holy Ghost <- ["active spiration", bend left=22.5, green, text=black] Son;
      };
\end{tikzpicture}

\end{document}

三位一体关系

相关内容