5x5 go board PostScript
- Phelan
- Gosei
- Posts: 1449
- Joined: Tue Apr 20, 2010 3:15 pm
- Rank: KGS 6k
- GD Posts: 892
- Has thanked: 1550 times
- Been thanked: 140 times
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?
- Attachments
-
- gb-5x5-plain-A4.ps
- (18.59 KiB) Downloaded 892 times
- Phelan
- Gosei
- Posts: 1449
- Joined: Tue Apr 20, 2010 3:15 pm
- Rank: KGS 6k
- GD Posts: 892
- Has thanked: 1550 times
- Been thanked: 140 times
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!
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!
-
xed_over
- Oza
- Posts: 2264
- Joined: Mon Apr 19, 2010 11:51 am
- Has thanked: 1179 times
- Been thanked: 553 times
Re: 5x5 go board PostScript
I prefer this simplier version...
still just one per page, but should be easier to do multiples
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
- Phelan
- Gosei
- Posts: 1449
- Joined: Tue Apr 20, 2010 3:15 pm
- Rank: KGS 6k
- GD Posts: 892
- Has thanked: 1550 times
- Been thanked: 140 times
Re: 5x5 go board PostScript
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.
- Phelan
- Gosei
- Posts: 1449
- Joined: Tue Apr 20, 2010 3:15 pm
- Rank: KGS 6k
- GD Posts: 892
- Has thanked: 1550 times
- Been thanked: 140 times