#!/bin/sh

STARTURL='http://zeppo.cs.ubc.ca:5656/bin/www_query?MODEL=face&view=front&form_starts_here=none&Corrugator=0.0&Frontalis=0.0&Blink=0.0&Headsize1=0.0&BOutBrow=0.0&Jaw_Open='
ENDURL='&infrown=0.0&lips1=0.6&lips2in=0.4&NoseSize=0.0&rsnarl1=0.5&imagesize=VRML&texture=Skin&presets=None'
NUM=0
MAX=21

while test "$NUM" -le "$MAX"
do
	JAW=`echo $NUM / 21.0 | bc -l`
	URL=`webget -post "$STARTURL$JAW$ENDURL" |\
		grep wrl | tr '"' '\012' | grep wrl`
	webget -nab="coord$NUM.wrl" -np -q "$URL"
	NUM="`expr $NUM + 1`"
done