This is some Perl code to calculate various mathematical paths through a 2-D X,Y plane, sending an index N to coordinates X,Y, or from coordinates to index.

         14  3 12 ...
      15  4  1  2 11 28
   16  5  6  7  8  9 10 27
17 18 19 20 21 22 23 24 25 26

Read more on the general operation in the online man page and see the full list of online man pages.

Math-PlanePath is free software (free as in freedom), published under the terms of the GNU General Public License (v3 or higher).

Download version 129 here, either just the .pm file, the full source here or from CPAN, or a Debian package here or from my repo.

Math-PlanePath-129.tar.gz (1507k, and sig)
libmath-planepath-perl_129-0.1_all.deb (1199k, and sig)

Separate Math-PlanePath-Toothpick has toothpick and some more cellular patterns. Download version 18,

Math-PlanePath-Toothpick-18.tar.gz (168k, and sig)
libmath-planepath-toothpick-perl_18-0.1_all.deb (120k, and sig)

The sig files are Gnu PG ascii armoured signatures generated from my key. There's a SIGNATURE file inside the .tar.gz for cpansign too. Older sources can be found at backpan.


There's no drawing in Math-PlanePath, just coordinate calculations (see math-image for drawing), but here's some samples. Each image is a link to its section in the gallery (PNG images, about 338k total).

And in the Math-PlanePath-Toothpick distribution,

See math-image to display various values on these these paths.

This page Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Kevin Ryde, except for the GPLv3 logo which is Copyright Free Software Foundation and used here in accordance with its terms.

Imagine this page spiralling.
(Back to the sitemap.)