NAME
Math::PlanePath::MathImageCCurve -- Levy C curve
SYNOPSIS
use Math::PlanePath::MathImageCCurve;
my $path = Math::PlanePath::MathImageCCurve->new;
my ($x, $y) = $path->n_to_xy (123);
DESCRIPTION
This is ...
11-----10-----9/7-----6------5 3
| | |
13-----12 8 4------3 2
| |
19---14/18----17 2 1
| | | |
21-----20 15-----16 0------1 <- Y=0
|
22 -1
|
25/23---24 -2
|
26 35-----34-----33 -3
| | |
27/37--28/36 32 -4
| | |
38 29-----30-----31 -5
|
39/41-----40 -6
|
42 ... -7
| |
43-----44 49-----48 64-----63 -8
| | | |
45---46/50----47 62 -9
| |
51-----52 56 60-----61 -10
| | |
53-----54----55/57---58-----59 -11
^
-7 -6 -5 -4 -3 -2 -1 X=0 1
FUNCTIONS
See "FUNCTIONS" in Math::PlanePath for the behaviour common to all path classes.
$path = Math::PlanePath::MathImageCCurve->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.Fractional positions give an X,Y position along a straight line between the integer positions.
$n = $path->xy_to_n ($x,$y)
-
Return the point number for coordinates
$x,$y
. If there's nothing at$x,$y
then returnundef
. $n = $path->n_start()
-
Return 0, the first N in the path.
SEE ALSO
Math::PlanePath, Math::PlanePath::DragonCurve, Math::PlanePath::ComplexMinus