[pstricks] pst-poly and \PstPolygon
mathias legrand
legrand.mathias at gmail.com
Thu Nov 4 16:03:20 CET 2010
> When you write
>> PolyNbSides=6,PolyOffset=2
> you are instructing the macro to advance the index by 2 at each step, so you only see 3 of the 6 vertices. More generally, it is useful to use
> PolyNbSides=m,PolyOffset=n only when m,n are relatively prime.
I agree with this statement but I think it is legitimate to get a
6-vertice star whatever the way you create the star. If PolyOffset
divides PolyNbSides then a propoer rotation should be added, I think.
Please see below:
\documentclass[fleqn,10pt]{book}
\usepackage{pst-poly}
\usepackage{pstricks-add}
\begin{document}
\begin{figure}[h!]\centering
\begin{pspicture}[showgrid=true](0,0)(2,2)
\rput[cc](1,1){\PstPolygon[fillstyle=solid,fillcolor=red,linestyle=none,PolyNbSides=6,PolyOffset=2]}
\end{pspicture}
\caption{what we get}
\end{figure}
\begin{figure}[h!]\centering
\begin{pspicture}[showgrid=true](0,0)(2,2)
\rput[cc](1,1){\PstPolygon[fillstyle=solid,fillcolor=red,linestyle=none,PolyNbSides=6,PolyOffset=2]}%
\rput[cc]{60}(1,1){\PstPolygon[fillstyle=solid,fillcolor=red,linestyle=none,PolyNbSides=6,PolyOffset=2]}
\end{pspicture}
\caption{what seems legitimate to get}
\end{figure}
\end{document}
More information about the PSTricks
mailing list