NAME

Math::PlanePath::MathImageDigitGroups -- 2x2 self-similar Z shape digits

SYNOPSIS

use Math::PlanePath::MathImageDigitGroups;

my $path = Math::PlanePath::MathImageDigitGroups->new;
my ($x, $y) = $path->n_to_xy (123);

# or another radix digits ...
my $path3 = Math::PlanePath::MathImageDigitGroups->new (radix => 3);

DESCRIPTION

This path ...

 7  |   
 6  |   
 5  |   
 4  |   
 3  |   
 2  |   
 1  |   
Y=0 |   
    +--------------------------------
     X=0   1   2   3   4   5   6   7

FUNCTIONS

See "FUNCTIONS" in Math::PlanePath for the behaviour common to all path classes.

$path = Math::PlanePath::MathImageDigitGroups->new ()
$path = Math::PlanePath::MathImageDigitGroups->new (radix => $r)

Create and return a new path object. The optional radix parameter gives the base for digit splitting (the default is binary, radix 2).

($x,$y) = $path->n_to_xy ($n)

Return the X,Y coordinates of point number $n on the path. Points begin at 0 and if $n < 0 then the return is an empty list.

SEE ALSO

Math::PlanePath, Math::PlanePath::ZOrderCurve