如何在五边形内制作等边星?
答案1
一种可能性(来自的简单变体)这个例子PS-Tricks 示例库):
\documentclass{article}
\usepackage{pst-poly}
\providecommand{\PstPolygonNode}{%
\psdots[dotscale=2](1;\INode)
\multido{\iA=0+1}{\INode}{%
\multido{\iB=\iA+1}{\numexpr\INode-\iA+1\relax}{%
\psline[linecolor=blue!50](1;\iA)(1;\iB)}}}
\begin{document}
\psset{unit=2,linewidth=0.2pt}
\PstPolygon[PolyNbSides=5]
\end{document}
答案2
与 Gonzalo 的回答略有不同:
\documentclass{article}
\usepackage{pst-node,multido}
\begin{document}
\begin{pspicture}(5,5)
\SpecialCoor
\multido{\i=0+1}{7}{\rput{90}{\degrees[5]\pnode(1;\i){v\i}}}% Mark nodes
\multido{\i=0+1}{5}{%
\pcline(v\i)(v\number\numexpr\i+1)% C_5<1>
\pcline(v\i)(v\number\numexpr\i+2)% C_5<2>
\pscircle[fillstyle=solid,fillcolor=black](v\i){2pt}% node
}
\end{pspicture}
\end{document}
还有pst-poly
:
\documentclass{article}
\usepackage{pst-poly}
\begin{document}
\begin{pspicture}(5,5)
\providecommand{\PstPolygonNode}{\psdots[dotsize=0.1](1;\INode)}
\rput{90}(2,2){\PstPolygon[PolyNbSides=5]}
\rput{90}(2,2){\PstPolygon[PolyNbSides=5,PolyOffset=2]}
\end{pspicture}
\end{document}