On rows with odd Y there's a solid block at either end then 1 of 3 cells to the left and 2 of 3 to the right of the centre. On even Y rows there's similar 1 of 3 and 2 of 3 middle parts, but without the solid ends. Those 1 of 3 and 2 of 3 are successively offset so as to make lines going up towards the centre as can be seen in the following plot.

Return the point number for coordinates $x,$y. $x and $y are each rounded to the nearest integer, which has the effect of treating each cell as a square of side 1. If $x,$y is outside the pyramid or on a skipped cell the return is undef.

HOME PAGE

LICENSE

Copyright 2011, 2012, 2013, 2014 Kevin Ryde

This file is part of Math-PlanePath.

Math-PlanePath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Math-PlanePath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Math-PlanePath. If not, see <http://www.gnu.org/licenses/>.

Module Install Instructions

To install Math::PlanePath::CellularRule57, simply copy and paste either of the commands in to your terminal