有没有办法只绘制三角形的顶点?
\begin{tikzpicture}[x=1mm, y=1mm]
\coordinate (A) at (0:12);
\coordinate (B) at (120:12);
\coordinate (C) at (240:12);
\foreach \i in {0, 1, ..., 9}{
\draw[line width=0.1mm] (A) -- (B) -- (C) -- cycle;
\path
(A) coordinate (X)
-- (B) coordinate[pos=0.2] (A)
-- (C) coordinate[pos=0.2] (B)
-- (X) coordinate[pos=0.2] (C);
}
\end{tikzpicture}
第一个三角形的边缘应该可见。
答案1
insert path
对于此类事情来说非常方便
\begin{tikzpicture}[scale=.5,c/.style={insert path={node[inner sep=2pt,fill,circle]{}}}]
\coordinate (A) at (0:12);
\coordinate (B) at (120:12);
\coordinate (C) at (240:12);
\draw[line width=0.1mm] (A) -- (B) -- (C) -- cycle;
\foreach \i in {0, 1, ..., 9}{
\path (A) [c]coordinate (X)
-- (B) [c]coordinate[pos=0.2] (A)
-- (C) [c]coordinate[pos=0.2] (B)
-- (X) coordinate[pos=0.2] (C);
}
\end{tikzpicture}
答案2
这解决方案没有和percusse
有insert path
稍微小一点的圆圈:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=.5]
\coordinate (A) at (0:12);
\coordinate (B) at (120:12);
\coordinate (C) at (240:12);
\draw[line width=0.1mm] (A) -- (B) -- (C) -- cycle;
\path[
every node/.style={circle, fill, inner sep=1.5pt},
]
\foreach \i in {0, 1, ..., 9}{
(A) node (X) {}
-- (B) node{} coordinate[pos=0.2] (A)
-- (C) node{} coordinate[pos=0.2] (B)
-- (X.center) coordinate[pos=0.2] (C)
}
;
\end{tikzpicture}
\end{document}