Life In 19x19 http://prod.lifein19x19.com/ |
|
5x5 go board PostScript http://prod.lifein19x19.com/viewtopic.php?f=18&t=589 |
Page 1 of 1 |
Author: | Phelan [ Fri May 21, 2010 7:00 am ] | ||
Post subject: | 5x5 go board PostScript | ||
I've adapted the postscript files at Invasion of printable go boards to 5x5 just by changing some of the parameters, but I was interested in trying to print out two per A4 sheet. Can anyone with better PostScript knowledge than me help out?
|
Author: | Phelan [ Fri May 21, 2010 7:32 am ] |
Post subject: | Re: 5x5 go board PostScript |
Partially solved it by moving to the corner, and getting the same sheet of paper back into the printer. ![]() I'll try to make a better file later, one that actually has different variables for x1 y1 and x2 y2, and goes over the printing routine once for each board. Now all I need to find is cheap stones. Off to the decoration shops! ![]() |
Author: | xed_over [ Fri May 21, 2010 9:43 am ] |
Post subject: | Re: 5x5 go board PostScript |
I prefer this simplier version... Code: %!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 0 0 579 617 %%EndComments % Go board by David Fifield <david@bamsoftware.com>. This program is not % copyrighted; there is no restriction on its use, modification and % redistribution for any purpose, commercial or non-commercial. % The default bounding box is for boardsize = 19, h_dist = 2.2 cm, % v_dist = 2.37 cm and edge = 1.4 cm. For different values of these variables, % calculate the size of the bounding box like this: % 0 0 boardsize 1 sub h_dist mul edge 2 mul add % boardsize 1 sub v_dist mul edge 2 mul add % Here are precomputed bounding boxes for boardsize = 13 %%BoundingBox: 0 0 828 886 % and boardsize = 9. %%BoundingBox: 0 0 579 617 % and boardsize = 19 %%BoundingBox: 0 0 1202 1289 /cm {2.54 div 72 mul} bind def /boardsize 5 def /h_dist 2.2 cm def /v_dist 2.37 cm def /edge 1.4 cm def /linewidth .1 cm def /starpointradius .2 cm def edge edge translate linewidth setlinewidth % Draw the edges of the board. newpath 0 0 moveto h_dist boardsize 1 sub mul 0 rlineto 0 v_dist boardsize 1 sub mul rlineto h_dist boardsize 1 sub mul neg 0 rlineto closepath stroke % Draw the other lines. newpath 1 1 boardsize 2 sub { dup h_dist mul 0 moveto 0 v_dist boardsize 1 sub mul rlineto 0 exch v_dist mul moveto h_dist boardsize 1 sub mul 0 rlineto } for stroke % Draw the star points. newpath mark /corner boardsize 13 lt { 2 } { 3 } ifelse def boardsize 2 mod 0 ne { boardsize 5 ge { boardsize 2 idiv dup } if boardsize 19 ge { dup dup corner dup 3 -1 roll dup dup boardsize corner sub 1 sub dup 3 -1 roll } if } if boardsize 9 ge { corner dup dup boardsize corner sub 1 sub dup dup 3 index exch dup } if { dup mark eq { pop exit } if exch h_dist mul exch v_dist mul starpointradius 0 360 arc fill } loop %%EOF still just one per page, but should be easier to do multiples |
Author: | Phelan [ Sat May 22, 2010 3:50 am ] |
Post subject: | Re: 5x5 go board PostScript |
Thanks. ![]() |
Author: | Phelan [ Thu Jun 17, 2010 9:58 am ] |
Post subject: | Re: 5x5 go board PostScript |
Just to note that my request was answered in this thread: viewtopic.php?f=18&t=884&start=0 ![]() |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |