# this works as a bash include
#
#PRIO 1.1
#COMM &Math::GeometNdPoint::points2vectors
#
perl -e '
  use lib shift();  # give include precedence to code directory, perl -I would not work!
  use strict;
  #use Math::Geomet2dPoint;
  use Math::GeometNdPoint;
  my $ndim=3;
  my @pt = map{  Math::GeometNdPoint->new($ndim,$_) }
    [ -5, 10,  -2 ],
    [  6, -6,   1 ],
    [  7,  6, -10 ],
    [  4, -1,  -1 ],
    ;
  printf "argument points: %s\n", join(q( ), map{ $_->string() } @pt);
  my @vec = &geometnd_pts2vects(@pt);
  printf "connecting vectors: %s\n",
    join(q( ), map{ $_->string(-label=>q(vector)) } @vec);
  printf "argument points, control: %s\n", join(q( ), map{ $_->string() } @pt);
  ' -- "$dircode"
