Need help with Postscript programming
Hi everyone!
I have to draw a polygon with every diagonal, and the problem is i have limited time to do that. So i would like to ask your help.
Please check attached file:
http://s27.postimg.org/4mrzze11v/polygon_with_all_diagonal.png
Something like this.
Thats all what i could work out:
300 200 translate
/S 28 def
S S scale
4 S div setlinewidth
1 setlinecap
1 setlinejoin
/n 6 def
/r 6 def
newpath
r 0 moveto
1 1 n 1 sub
{
/i exch def
360 n div i mul cos r mul
360 n div i mul sin r mul lineto
} for
closepath
stroke
I have no idea how to draw the diagonals.
Please help me!
Best regards:
Mihaly Varga
