admin管理员组文章数量:1400503
I am trying to draw the red,dashed line to enclose 3 nodes so that it forms a curved space. It should follow the curve of the circle. Tried to use different coordinates.
Is this the problem with the coordinates ?
\begin{tikzpicture}[auto,
> = Stealth,
every edge quotes/.style = {font=\footnotesize}, % if you like to have smaller
edge labels
every edge/.append style = {->, draw=cyan, thick},
every loop/.append style = {<-, looseness = 12},
node distance = 12mm,
state/.style = {circle, semithick, draw=cyan, text=cyan, minimum size=1.2em},
ellipsefit/.style = {draw=red, thick, dashed, ellipse},
rect/.style = {rectangle, draw=cyan, thick, minimum width=2.5cm, minimum height=1.5cm, align=center}
]\def\radius{3}
\foreach \a in {1,2,3,4,5} {
\node[state] (N\a) at ({\a*360/5}:\radius) {Node \a};
}
\path (N5) edge[bend right=20] (N1);
\path (N1) edge[bend right=20] (N2);
\path (N2) edge[bend right=20] (N3);
\path (N3) edge[bend right=20] (N4);
\path (N4) edge[bend right=20] (N5);
\draw[red, thick, dashed]
plot[smooth cycle, tension=1] coordinates {
($(N1) + (0.7, 0.7)$)
($(N2) + (-0.8, 1.5)$)
($(N3) + (0.7, -0.8)$)
};
\end{tikzpicture}
I tried to change the coordinates.
Update : It appears to improve if I understand the grid and try to pull the curve.
\draw[ultra thick,blue]
(-3.9,1.9)
.. controls (3.3,6.5) and (5,3) ..
(-1,-2)
.. controls (-1.2,-3.3) and (-3.9,-4.8) ..
(-3.9,1.9);
本文标签: tikzCreate curved enclosing space to cover nodesStack Overflow
版权声明:本文标题:tikz - Create curved enclosing space to cover nodes - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744257354a2597544.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论