in reply to edge of polygon

It's hard for me to make sense of what you write. Maybe you're looking for Nearest neighbor search? Or for calculating polygon properties?

Perl 6 - links to (nearly) everything that is Perl 6.