# this works as a bash include
#
#PRIO 1.1
#COMM Math::Geomet2dPoint and Math::Geomet2dTrform
#COMM - use constructor Math::Geomet2dPoint->new($x,$y)
#COMM - use constructor Math::Geomet2dTrform->new_rotate()
#COMM - successively call Math::Geomet2dPoint->transform() and analyse result
#COMM   via Math::Geomet2dPoint->amount()
#
perl -e '
  use lib shift();  # give include precedence to code directory, perl -I would not work!
  use strict;
  use Math::Geomet2dPoint;
  use Math::Geomet2dTrform;
  our $pi=3.14;
  our $nstep=11;
  our $wstep=$pi/($nstep-1);
  my $pPt = Math::Geomet2dPoint->new(1,0);
  my $pTf = Math::Geomet2dTrform->new_rotate($wstep);
  for (my $a=0; $a<$pi*1.001; $a+=$wstep){
    printf qq(%.3f\t%.3f\n), $a, $pPt->amount();
    $pPt->transform($pTf);
  }
  ' -- "$dircode"
