The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Math::PlanePath::MathImageKochelCurve -- 3x3 self-similar S and R

SYNOPSIS

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

DESCRIPTION

In progress ...

This is an integer version of a 3x3 self-similar curve by Herman Haverkort,

     14   
          
     13   
          
     12   
          
     11   
          
     10   
          
      9   
          
      8   
          
      7   
          
      6   
          
      5   
          
      4   
          
      3   
          
      2   
          
      1   
          
    Y=0-> 
          
            X=0  1   2   3   4   5   6   7   8   9  10  11  12  13  14

The base pattern is the N=0 to N=8 section. It then repeats with rotations or reversals that make the ends join.

FUNCTIONS

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

$path = Math::PlanePath::MathImageKochelCurve->new ()

Create and return a new path object.

($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::PeanoCurve

Herman Haverkort, "Recursive Tilings and Space-Filling Curves with Little Fragmentation"

    http://arxiv.org/abs/1002.1843