#! /bin/csh -f -e
# Last edited on 2000-05-02 15:48:01 by stolfi

# Plots the hodograph (velocity curve) of a contour

set usage = "$0 PIECE VARIANT CURVE"

set piece = "$1"; shift
set variant = "$1"; shift
set curve = "$1"; shift
if ( $#argv != 0) then
  echo "usage: ${usage}"; exit 1
endif
set dir = "${piece}-${variant}"

if ( -r ${dir}/${curve}.flv ) then
  echo "generating ${piece}-${curve}-vel.ps"
  cat ${dir}/${curve}.flv \
    | /n/gnu/bin/nice PZDraw \
      -window ${piece}-vel \
      -output ${dir}/${curve}-vel \
      -grid 25 \
      -axes

  ghostview -openwindows ${dir}/${curve}-vel.ps
else
  echo "${dir}/${curve}.flv not found"
endif