#! /bin/csh -fe
# Last edited on 2004-04-30 21:59:43 by stolfi

set path = ( \
  ${STOLFIHOME}/programs/c/PZ/converted/ \
  ${path} \
)

set puzzle  = "o"
set image  = "o-0000"
set grey = 177

echo '=== '${image}' ==============================='

sh -c "/bin/rm -f ${image}.flc ${image}.ps ; exit 0"

pz_boundary \
  -inFile ${image} \
  -black ${grey} \
  -grey ${grey} \
  -outFile ${image}-i \
  -inside

nice pz_boundary \
  -inFile ${image} \
  -black ${grey} \
  -grey ${grey} \
  -outFile ${image}-o \
  -outside

nice pz_boundary \
  -inFile ${image} \
  -black ${grey} \
  -grey ${grey} \
  -outFile ${image}-m

cat ${image}-m.flc ${image}-i.flc ${image}-o.flc \
  | nice pz_draw \
      -windowFile ${puzzle} \
      -grid 1.0 \
      -output ${image} \
      -rectFile ${puzzle} \
      -epsFormat

#ghostview -openwindows ${image}.ps
