It is currently Thu Mar 28, 2024 9:27 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
Offline
 Post subject: 5x5 go board PostScript
Post #1 Posted: Fri May 21, 2010 7:00 am 
Gosei
User avatar

Posts: 1449
Liked others: 1562
Was liked: 140
Rank: KGS 6k
GD Posts: 892
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 648 times

_________________
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go
Top
 Profile  
 
Offline
 Post subject: Re: 5x5 go board PostScript
Post #2 Posted: Fri May 21, 2010 7:32 am 
Gosei
User avatar

Posts: 1449
Liked others: 1562
Was liked: 140
Rank: KGS 6k
GD Posts: 892
Partially solved it by moving to the corner, and getting the same sheet of paper back into the printer. :roll:

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! ;-)

_________________
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go

Top
 Profile  
 
Offline
 Post subject: Re: 5x5 go board PostScript
Post #3 Posted: Fri May 21, 2010 9:43 am 
Oza

Posts: 2264
Liked others: 1180
Was liked: 552
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

Top
 Profile  
 
Offline
 Post subject: Re: 5x5 go board PostScript
Post #4 Posted: Sat May 22, 2010 3:50 am 
Gosei
User avatar

Posts: 1449
Liked others: 1562
Was liked: 140
Rank: KGS 6k
GD Posts: 892
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.

_________________
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go

Top
 Profile  
 
Offline
 Post subject: Re: 5x5 go board PostScript
Post #5 Posted: Thu Jun 17, 2010 9:58 am 
Gosei
User avatar

Posts: 1449
Liked others: 1562
Was liked: 140
Rank: KGS 6k
GD Posts: 892
Just to note that my request was answered in this thread: viewtopic.php?f=18&t=884&start=0
:)

_________________
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group