How do I make an equilateral star inside a pentagon?
Asked
Active
Viewed 491 times
-1
2 Answers
2
A possibility (a simple variation from this example of the PS-Tricks example gallery):
\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}

Gonzalo Medina
- 505,128
2
Slightly different than Gonzalo's answer:

\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}
There is also 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}
Werner
- 603,163
\documentclass{}...\begin{document}etc. As it is, most of our users will be very reluctant to touch your question, and you are left to the mercy of our procrastination team who are very few in number and very picky about selecting questions. You can improve your question by adding a minimal working example (MWE) that more users can copy/paste onto their systems to work on. If no hero takes the challenge we might have to close your question. – cfr Feb 16 '15 at 03:24