[pstricks] pst-poly and \PstPolygon

Michael Sharpe msharpe at ucsd.edu
Wed Nov 3 21:48:50 CET 2010

On Nov 1, 2010, at 2:25 PM, mathias legrand wrote:

> Hi all,
> in pst-poly by Denis Girou, I think there is a limitation for specific combinations of the available parameters. For instance:
> \PstPolygon[fillstyle=solid,fillcolor=red,linestyle=none,PolyNbSides=6,PolyOffset=2]
> generates a simple triangle even though we want a six-sided star similar to:
> \PstPolygon[fillstyle=solid,fillcolor=red,linestyle=none,PolyNbSides=5,PolyOffset=2]
> The proposed command is not very robust when PolyNbSides is an even integer. Could this be improved?

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.


More information about the PSTricks mailing list