Professional Documents
Culture Documents
Setting up EPS
1) You need to install following 2 softwares in order:
Ghoscript – https://www.ghostscript.com/download/
GS View - http://pages.cs.wisc.edu/~ghost/gsview/
2) Download the software from above mentioned links and follow the setup
directions, its pretty straight forward and easy.
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 181 425 475 745
%%HiResBoundingBox: 174.700 444.700 455.300 725.300
%CreatedBy deb.mohanty@gmail.com on Sat Feb 13
16:10:33 IST 2010
/CellSize 32 def
/Style
[
[ %Normal Cell
[0 0 0 1 ] %Stroke
bgcolor false %Fill
.75 %LineWidth
]
[ %Normal Cell
[0 0 0 1 ] %Stroke
[0 .1 .1 .3 ] true %Fill
.75 %LineWidth
]
[ %Normal Cell
[0 0 0 1 ] %Stroke
[.1 .1 0 .6 ] true %Fill
.75 %LineWidth
]
[ %OuterGrid or Shaped area
darkColor %Stroke
[0 0 0 0 ] false %Fill
CellSize 2.5 div %LineWidth
]
[ %Circle
.6 % Size of the circle in terms of CellSize
darkColor %Stroke
darkColor true %fill
1 %LineWidth
]
[ %OuterGrid or Shaped area
[0 0 0 1 ] %Stroke
[0 0 0 0 ] false %Fill
CellSize 10 div %LineWidth
]
] def
/FontStyles
[
[ % Normal Cell
0.7 CellSize mul %Size
(Arial) %Font
[0 0 0 1 ] %Color
]
[ % Normal Cell
/AreaData
[
[ 0 0 0 4 4 4 0 0 0 ]
[ 0 0 0 4 4 4 0 0 0 ]
[ 0 0 0 4 4 4 0 0 0 ]
[ 1 1 1 2 2 2 1 1 1 ]
[ 1 1 1 2 2 2 1 1 1 ]
[ 1 1 1 2 2 2 1 1 1 ]
[ 3 3 3 5 5 5 3 3 3 ]
[ 3 3 3 5 5 5 3 3 3 ]
[ 3 3 3 5 5 5 3 3 3 ]
]
def
% PUZZLE_DATA - START
/PuzzleId (148) def
/ShowDigits
[
[ 0 5 0 0 0 0 0 2 0 ]
[ 6 0 0 0 0 0 0 0 1 ]
[ 0 0 0 0 0 0 0 0 0 ]
[ 0 0 0 0 0 0 0 0 0 ]
[ 0 0 0 0 5 0 0 0 0 ]
[ 0 0 0 0 0 0 0 0 0 ]
[ 0 0 0 0 0 0 0 0 0 ]
[ 3 0 0 0 0 0 0 0 2 ]
[ 0 8 0 0 0 0 0 9 0 ]
]
def
/SolutionDigits
[
[ 9 5 8 1 6 7 3 2 4 ]
[ 6 2 3 5 4 8 9 7 1 ]
[ 7 1 4 2 3 9 8 6 5 ]
[ 5 4 2 8 9 1 6 3 7 ]
[ 8 7 6 3 5 2 4 1 9 ]
[ 1 3 9 6 7 4 2 5 8 ]
[ 2 6 7 9 8 5 1 4 3 ]
[ 3 9 5 4 1 6 7 8 2 ]
[ 4 8 1 7 2 3 5 9 6 ]
]
def
% PUZZLE_DATA - END
/LoopPath
[
[ [3 6][1 6][1 4] ]
[ [2 3][2 2][3 2] ]
[ [4 1][4 2][3 2] ]
[ [5 1][5 3][4 3] ]
[ [6 3][4 3] ]
[ [7 3][7 2][6 2][6 1] ]
[ [8 2][6 2][6 1] ]
[ [4 5][4 4][5 4] ]
[ [6 5][6 4][5 4] ]
[ [2 4][2 5][3 5][3 4] ]
[ [3 3][3 4] ]
[ [7 5][7 6][4 6] ]
[ [2 7][6 7] ]
[ [2 8][5 8] ]
[ [4 9][4 8][5 8] ]
[ [5 9][6 9][6 8][7 8][7 7] ]
[ [8 3][8 5] ]
[ [7 4][8 4][8 5] ]
[ [9 4][8 4][8 5] ]
[ [8 8][8 6][9 6][9 5] ]
] def
} def
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/DrawPath {
/path exch def
/firstpoint path 0 get def
/xHere firstpoint 0 get def
/yHere firstpoint 1 get def
/xHere xHere 1 sub CellSize mul def
/yHere yHere 1 sub CellSize mul def
newpath
yHere xHere neg moveto
path { aload pop 1 sub CellSize mul exch 1 sub neg
CellSize mul lineto } forall
stroke
} def
/DrawPath {
/path exch def
/firstpoint path 0 get def
/xHere firstpoint 0 get def
/yHere firstpoint 1 get def
/xHere xHere 1 sub CellSize mul def
/yHere yHere 1 sub CellSize mul def
yHere xHere neg moveto
stroke
path { /aaa exch def } forall
WhiteCircleStyle aaa aload pop 1 sub CellSize mul
exch 1 sub neg CellSize mul doACircle
} def
/y 0 def
/row 0 def
AreaData {
/x 0 def
/col 0 def
{
Style 0 get x y CellSize CellSize doARectangle
/col col 1 add def
/x x CellSize add def
} forall
/y y CellSize sub def
/row row 1 add def
} forall
/row 0 def
/y 0 def
AreaData {
/col 0 def
/prev 0 def
/x 0 def
{
/c exch def
c prev ne {
OuterGridStyle x HalfCellSize sub y
HalfCellSize sub x HalfCellSize sub y HalfCellSize
add doALine
} if
row 0 gt {
/r_minus_1 row 1 sub def
/prev_col AreaData r_minus_1 get col get def
c prev_col ne {
OuterGridStyle x HalfCellSize add y
HalfCellSize add x HalfCellSize sub y HalfCellSize
add doALine
} if
} if
/x x CellSize add def
/col col 1 add def
/prev c def
} forall
/y y CellSize sub def
/row row 1 add def
} forall
ShowSolution {
/y 0 def
SolutionDigits {
/x 0 def
{
/c exch def
c 0 gt { c FontStyles 0 get x y showCharORDigit
} if
/x x CellSize add def
} forall
/y y CellSize sub def
} forall
} if
/y 0 def
ShowDigits {
/x 0 def
{
/c exch def
c 0 gt { c FontStyles c 9 gt { 2 } { 0 } ifelse
get x y showCharORDigit } if
/x x CellSize add def
} forall
/y y CellSize sub def
} forall
-70 50 translate
/ArrowFont
[ % Normal Cell
.3 CellSize mul %Size
(Arial Rounded MT Bold) %Font
[0 0 0 0] %Color
]
def
/row1 4 def
/row2 6 def
/col 2 def
/NewHArrow {
/yyy exch def
/xxx exch def
[0 0 0 .9] SetColour
newpath
xxx yyy moveto
.7 CellSize mul .4 CellSize mul rlineto
-.7 CellSize mul .4 CellSize mul rlineto
.1 CellSize mul -.4 CellSize mul rlineto
closepath
fill
ArrowFont xxx .28 CellSize mul add yyy .4 CellSize
mul add showCharORDigit
} def
/NewVArrow {
[0 0 0 .9] SetColour
/yyy exch def
/xxx exch def
newpath
xxx yyy moveto
.4 CellSize mul -.7 CellSize mul rlineto
.4 CellSize mul .7 CellSize mul rlineto
-.4 CellSize mul -.1 CellSize mul rlineto
closepath
fill
ArrowFont xxx .42 CellSize mul add yyy -.3 CellSize
mul add showCharORDigit
} def
clear
showpage
To View Solution
[
[ 9 5 8 1 6 7 3 2 4 ]
[ 6 2 3 5 4 8 9 7 1 ]
[ 7 1 4 2 3 9 8 6 5 ]
[ 5 4 2 8 9 1 6 3 7 ]
[ 8 7 6 3 5 2 4 1 9 ]
[ 1 3 9 6 7 4 2 5 8 ]
[ 2 6 7 9 8 5 1 4 3 ]
[ 3 9 5 4 1 6 7 8 2 ]
[ 4 8 1 7 2 3 5 9 6 ]
]
def
% PUZZLE_DATA - END
/LoopPath
[
[ [3 6][1 6][1 4] ]
[ [2 3][2 2][3 2] ]
[ [4 1][4 2][3 2] ]
[ [5 1][5 3][4 3] ]
[ [6 3][4 3] ]
[ [7 3][7 2][6 2][6 1] ]
[ [8 2][6 2][6 1] ]
[ [4 5][4 4][5 4] ]
[ [6 5][6 4][5 4] ]
[ [2 4][2 5][3 5][3 4] ]
[ [3 3][3 4] ]
[ [7 5][7 6][4 6] ]
[ [2 7][6 7] ]
[ [2 8][5 8] ]
[ [4 9][4 8][5 8] ]
[ [5 9][6 9][6 8][7 8][7 7] ]
[ [8 3][8 5] ]
[ [7 4][8 4][8 5] ]
[ [9 4][8 4][8 5] ]
[ [8 8][8 6][9 6][9 5] ]
] def
Final Words – Above code is for Thermo Sudoku, once you have setup the
process, you can request either me or Prasanna to send the eps file for the
Sudoku Type you want to create.