Math::PlanePath::MathImageStaircaseAlternatingContinuous -- integer points in stair-step diagonal stripes
use Math::PlanePath::MathImageStaircaseAlternatingContinuous; my $path = Math::PlanePath::MathImageStaircaseAlternatingContinuous->new; my ($x, $y) = $path->n_to_xy (123);
This path makes a staircase pattern up from the X axis to the Y axis and back again,
7 26--27 | | 6 25 28--29 | | 5 24--23 30--31 | | 4 . 22--21 32--33 | | 3 6-- 7 20--19 34--35 ..-47 | | | | | 2 5 8-- 9 18--17 36--37 46--45 | | | | | 1 4-- 3 10--11 16--15 38--39 44--43 | | | | | y=0 -> 1-- 2 . 12--13--14 . 40--41--42 ^ x=0 1 2 3 4 5 6 7 8 9
See "FUNCTIONS" in Math::PlanePath for the behaviour common to all path classes.
$path = Math::PlanePath::MathImageStaircaseAlternatingContinuous->new ()
Create and return a new staircase path object.
($x,$y) = $path->n_to_xy ($n)
Return the X,Y coordinates of point number $n on the path.
$n
Math::PlanePath, Math::PlanePath::Staircase, Math::PlanePath::DiagonalsAlternating
To install Math::PlanePath, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::PlanePath
CPAN shell
perl -MCPAN -e shell install Math::PlanePath
For more information on module installation, please visit the detailed CPAN module installation guide.