Page 1 of 1
5x5 go board PostScript
Posted: Fri May 21, 2010 7:00 am
by Phelan
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?
Re: 5x5 go board PostScript
Posted: Fri May 21, 2010 7:32 am
by Phelan
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!

Re: 5x5 go board PostScript
Posted: Fri May 21, 2010 9:43 am
by xed_over
I prefer this simplier version...
Code: Select all
%!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
Re: 5x5 go board PostScript
Posted: Sat May 22, 2010 3:50 am
by Phelan
Thanks.

I might go with a mix of both, since I'm interested in using the crop marks and the text field to show a site url.
Re: 5x5 go board PostScript
Posted: Thu Jun 17, 2010 9:58 am
by Phelan
Just to note that my request was answered in this thread:
viewtopic.php?f=18&t=884&start=0