Math::PlanePath -- points on a path through the 2-D plane
use Math::PlanePath; # only a base class, see the subclasses for actual operation
This is the base class for some mathematical paths which map an integer position $n to and from coordinates $x,$y in the plane.
$n
$x,$y
The current classes include the following. The intention is that any Math::PlanePath::Something is a PlanePath, and supporting base classes or related things are further down like Math::PlanePath::Base::Xyzzy.
Math::PlanePath::Something
Math::PlanePath::Base::Xyzzy
SquareSpiral four-sided spiral PyramidSpiral square base pyramid TriangleSpiral equilateral triangle spiral TriangleSpiralSkewed equilateral skewed for compactness DiamondSpiral four-sided spiral, looping faster PentSpiral five-sided spiral PentSpiralSkewed five-sided spiral, compact HexSpiral six-sided spiral HexSpiralSkewed six-sided spiral skewed for compactness HeptSpiralSkewed seven-sided spiral, compact AnvilSpiral anvil shape OctagramSpiral eight pointed star KnightSpiral an infinite knight's tour CretanLabyrinth 7-circuit extended infinitely SquareArms four-arm square spiral DiamondArms four-arm diamond spiral AztecDiamondRings four-sided rings HexArms six-arm hexagonal spiral GreekKeySpiral spiral with Greek key motif MPeaks "M" shape layers SacksSpiral quadratic on an Archimedean spiral VogelFloret seeds in a sunflower TheodorusSpiral unit steps at right angles ArchimedeanChords chords on an Archimedean spiral MultipleRings concentric circles PixelRings concentric rings of midpoint pixels FilledRings concentric rings of pixels Hypot points by distance HypotOctant first octant points by distance TriangularHypot points by triangular lattice distance PythagoreanTree primitive triples by tree PeanoCurve 3x3 self-similar quadrant traversal HilbertCurve 2x2 self-similar quadrant traversal HilbertSpiral 2x2 self-similar whole-plane traversal ZOrderCurve replicating Z shapes WunderlichMeander 3x3 "R" pattern quadrant traversal BetaOmega 2x2 self-similar half-plane traversal AR2W2Curve 2x2 self-similar of four shapes KochelCurve 3x3 self-similar two shapes CincoCurve 5x5 self-similar ImaginaryBase replicating in four directions SquareReplicate 3x3 replicating squares CornerReplicate 2x2 replicating squares LTiling self-simlar L shapes DigitGroups digit groups of high zero FibonacciWordFractal turns by Fibonacci word bits Flowsnake self-similar hexagonal tile traversal FlowsnakeCentres likewise, but centres of hexagons GosperReplicate self-similar hexagonal tiling GosperIslands concentric island rings GosperSide single side or radial QuintetCurve self-similar "+" shape QuintetCentres likewise, but centres of squares QuintetReplicate self-similar "+" tiling DragonCurve paper folding DragonRounded same but rounding-off vertices DragonMidpoint paper folding midpoints AlternatePaper paper folding in alternating directions TerdragonCurve ternary dragon TerdragonMidpoint ternary dragon midpoints ComplexPlus base i+r ComplexMinus base i-r, including twindragon ComplexRevolving revolving base i+1 SierpinskiCurve self-similar right-triangles HIndexing self-similar right-triangles, squared up KochCurve replicating triangular notches KochPeaks two replicating notches KochSnowflakes concentric notched 3-sided rings KochSquareflakes concentric notched 4-sided rings QuadricCurve eight segment zig-zag QuadricIslands rings of those zig-zags SierpinskiTriangle self-similar triangle by rows SierpinskiArrowhead self-similar triangle connectedly SierpinskiArrowheadCentres likewise, but centres of triangles Rows fixed-width rows Columns fixed-height columns Diagonals diagonals down from the Y to X axes DiagonalsAlternating diagonals Y to X and back again Staircase stairs down from the Y to X axes StaircaseAlternating stairs Y to X and back again Corner expanding stripes around a corner PyramidRows expanding stacked rows pyramid PyramidSides along the sides of a 45-degree pyramid CellularRule cellular automaton by rule number CellularRule54 cellular automaton rows pattern CellularRule57 cellular automaton (rule 99 mirror too) CellularRule190 cellular automaton (rule 246 mirror too) UlamWarburton cellular automaton diamonds UlamWarburtonQuarter cellular automaton quarter-plane DiagonalRationals rationals X/Y by diagonals FactorRationals rationals X/Y by prime factorization GcdRationals rationals X/Y by rows with GCD integer RationalsTree rationals X/Y by tree FractionsTree fractions 0<X/Y<1 by tree CoprimeColumns coprime X,Y DivisibleColumns X divisible by Y File points from a disk file
The paths are object oriented to allow parameters, though many have none. See examples/numbers.pl in the Math-PlanePath sources for a cute sample printout of the numbering for selected paths or all paths.
examples/numbers.pl
The $n and $x,$y parameters can be either integers or floating point. The paths are meant to do something sensible with floating point fractions. Expect rounding-off for big exponents.
Floating point infinities (when available) are meant to give nan or infinite returns of some kind (some unspecified kind as yet). n_to_xy() on negative infinity $n is an empty return, the same as other negative $n. Calculations which break an input into digits of some base are meant not to loop infinitely on infinities.
n_to_xy()
Floating point nans (when available) are meant to give nan, infinite, or empty/undef returns, but again of some unspecified kind as yet but in any case not going into infinite loops.
Many of the classes can operate on overloaded number types as inputs and give corresponding outputs.
Math::BigInt maybe perl 5.8 up, for ** operator Math::BigRat Math::BigFloat Number::Fraction 1.14 or higher (for abs())
This is slightly experimental and some classes might truncate a bignum or a fraction to a float as yet. In general the intention is to make the code generic enough that it can act on sensible number types. Recent versions of the bignum modules might be required, perhaps Perl 5.8 and up for the ** exponentiation operator in particular.
**
For reference, an undef input to $n, $x,$y, etc, is meant to provoke an uninitialized value warnings (when warnings are enabled), but currently doesn't croak etc. Perhaps that will change, but the warning at least prevents bad inputs going unnoticed.
undef
In the following Foo is one of the various subclasses, see the list above and under "SEE ALSO".
Foo
$path = Math::PlanePath::Foo->new (key=>value, ...)
Create and return a new path object. Optional key/value parameters may control aspects of the object.
($x,$y) = $path->n_to_xy ($n)
Return X,Y coordinates of point $n on the path. If there's no point $n then the return is an empty list, so for example
my ($x,$y) = $path->n_to_xy (-123) or next; # usually no negatives in $path
Paths start from $path->n_start below, though some will give a position for N=0 or N=-0.5 too.
$path->n_start
$n = $path->xy_to_n ($x,$y)
Return the N point number for coordinates $x,$y. If there's nothing at $x,$y then return undef.
my $n = $path->xy_to_n(20,20); if (! defined $n) { next; # nothing at this X,Y }
$x and $y can be fractional and the path classes will give an integer $n which contains $x,$y within a unit square, circle, or intended figure centred on the integer $n.
$x
$y
For paths which completely tile the plane there's always an $n to return, but for the spread-out paths an $x,$y position may fall in between (no $n close enough).
@n_list = $path->xy_to_n_list ($x,$y)
Return a list of N point numbers for coordinates $x,$y. If there's nothing at $x,$y then return a empty list.
my @n_list = $path->xy_to_n(20,20);
Most paths have just a single N for a given X,Y, but for those like DragonCurve and TerdragonCurve where two or three N's give the same X,Y this method returns the list of those N values.
($n_lo, $n_hi) = $path->rect_to_n_range ($x1,$y1, $x2,$y2)
Return a range of N values covering or exceeding a rectangle with corners at $x1,$y1 and $x2,$y2. The range is inclusive. For example,
$x1
$y1
$x2
$y2
my ($n_lo, $n_hi) = $path->rect_to_n_range (-5,-5, 5,5); foreach my $n ($n_lo .. $n_hi) { my ($x, $y) = $path->n_to_xy ($n) or next; print "$n $x,$y"; }
The return may be an over-estimate of the range, and in all cases many of the points between $n_lo and $n_hi might be outside the rectangle. But the range at least bounds the N values which occur in the rectangle. Classes which guarantee an exact lo/hi range say so in their docs.
$n_lo
$n_hi
$n_hi is usually no more than an extra partial row, revolution, or self-similar level. $n_lo is often merely the starting $path->n_start(), which is fine if the origin is in the rectangle but something away from the origin might actually start higher.
$path->n_start()
$x1,$y1 and $x2,$y2 can be fractional and if they partly overlap some N figures then those N's are included in the return.
If there's no points in the rectangle then the return can be a "crossed" range like $n_lo=1, $n_hi=0 (and which makes a foreach do no loops). Though rect_to_n_range() might not notice there's no points in the rectangle and instead over-estimate the range.
$n_lo=1
$n_hi=0
foreach
rect_to_n_range()
$n = $path->n_start()
Return the first N in the path. In the current classes this is either 0 or 1.
Some classes have secret dubious undocumented support for N values below this (zero or negative), but n_start() is the intended starting point.
n_start()
$f = $path->n_frac_discontinuity()
Return the fraction of N at which there's discontinuities in the path. For example if there's a jump in the coordinates between N=7.4999 and N=7.5 then the returned $f is 0.5. Or $f is 0 if there's a discontinuity between 6.999 and 7.0.
$f
If there's no discontinuities in the path, so that for example fractions between N=7 to N=8 give smooth X,Y values (of some kind) then the return is undef.
This is mainly of interest for drawing line segments between successive N points. If there's discontinuities then the idea is to draw from say N=7.0 to N=7.499 and then another line from N=7.5 to N=8. The returned $f is whether there's discontinuities anywhere in $path.
$path
$bool = $path->x_negative()
$bool = $path->y_negative()
Return true if the path extends into negative X coordinates and/or negative Y coordinates respectively.
$bool = Math::PlanePath::Foo->class_x_negative()
$bool = Math::PlanePath::Foo->class_y_negative()
$bool = $path->class_x_negative()
$bool = $path->class_y_negative()
Return true if any paths made by this class extends into negative X coordinates and/or negative Y coordinates, respectively.
For some classes the X or Y extent may depend on parameter values.
$arms = $path->arms_count()
Return the number of arms in a "multi-arm" path.
For example in SquareArms this is 4 and each arm increments in turn, so the first arm is N=1,5,9,13, etc, incrementing by 4 each time.
$str = $path->figure()
Return a string name of the figure (shape) intended to be drawn at each $n position. This is currently either
"square" side 1 centred on $x,$y "circle" diameter 1 centred on $x,$y
Of course this is only a suggestion since PlanePath doesn't draw anything itself. A figure like a diamond for instance can look good too.
$aref = Math::PlanePath::Foo->parameter_info_array()
@list = Math::PlanePath::Foo->parameter_info_list()
Return an arrayref of list describing the parameters taken by a given class. This meant to help making widgets etc for user interaction in a GUI. Each element is a hashref
{ name => parameter key arg for new() share_key => string, or undef description => human readable string type => string "integer","boolean","enum" etc default => value minimum => number, or undef maximum => number, or undef width => integer, suggested display size choices => for enum, an arrayref }
type is a string, one of
type
"integer" "enum" "boolean" "string" "filename"
"filename" is separate from "string" since it might require subtly different handling to ensure it reaches Perl as a byte string, whereas a "string" type might in principle take Perl wide chars.
For "enum" the choices field is the possible values, such as
choices
{ name => "flavour", type => "enum", choices => ["strawberry","chocolate"], }
minimum and/or maximum are omitted if there's no hard limit on the parameter.
minimum
maximum
share_key is designed to indicate when parameters from different NumSeq classes can done by a single control widget in a GUI etc. Normally the name is enough, but when the same name has slightly different meanings in different classes a share_key allows the same meanings to be matched up.
share_key
name
$hashref = Math::PlanePath::Foo->parameter_info_hash()
Return a hashref mapping parameter names $info->{'name'} to their $info records.
$info->{'name'}
$info
The classes are mostly based on integer $n positions and those designed for a square grid turn an integer $n into integer $x,$y. Usually they give in-between positions for fractional $n too. Classes not on a square grid but instead giving fractional X,Y such as SacksSpiral and VogelFloret are designed for a unit circle at each $n but they too can give in-between positions on request.
All X,Y positions are calculated by separate n_to_xy() calls. To follow a path use successive $n values starting from $path->n_start().
foreach my $n ($path->n_start .. 100) { my ($x,$y) = $path->n_to_xy($n); print "$n $x,$y\n"; }
The separate n_to_xy() calls were motivated by plotting just some points of a path, such as just the primes or the perfect squares. Successive positions in paths could be done in an iterator style more efficiently. The paths with a quadratic "step" are not much worse than a sqrt() to break N into a segment and offset, but the self-similar paths which chop N into digits of some radix might increment instead of recalculate.
sqrt()
A disadvantage of an iterator is that if you're only interested in a particular rectangular or similar region then the iteration may stray outside for a long time, making it much less useful than it seems. For wild paths it can be better to apply xy_to_n() by rows or similar, on the square-grid paths at least.
xy_to_n()
The paths generally make a first move horizontally to the right or from the X axis anti-clockwise, unless there's some more natural orientation.
There's no parameters for scaling, offset or reflection as those things are thought better left to a general coordinate transformer, for example to expand or invert for display. But some easy transformations can be had just from the X,Y with
-X,Y flip horizontally (mirror image) X,-Y flip vertically (across the X axis) -Y,X rotate +90 degrees (anti-clockwise) Y,-X rotate -90 degrees (clockwise) -X,-Y rotate 180 degrees
Flip vertically makes the spirals go clockwise instead of anti-clockwise, or a flip horizontally the same but starting on the left at the negative X axis. See "Triangular Lattice" below for 60 degree rotations of the triangular grid paths.
The Rows and Columns paths are slight exceptions to the rule of not having rotated versions of paths. They began as ways to pass in width and height as generic parameters and let the path use the one or the other.
For scaling and shifting see Transform::Canvas or to rotate as well see Geometry::AffineTransform.
The paths can be characterized by how much longer each loop or repetition is than the preceding one. For example each cycle around the SquareSpiral is 8 more N points than the preceding.
Step Path ---- ---- 0 Rows, Columns (fixed widths) 1 Diagonals 2 SacksSpiral, PyramidSides, Corner, PyramidRows (default) 4 DiamondSpiral, AztecDiamondRings, Staircase 4/2 CellularRule54, CellularRule57, DiagonalsAlternating (2 rows for +4) 5 PentSpiral, PentSpiralSkewed 5.65 PixelRings (average about 4*sqrt(2)) 6 HexSpiral, HexSpiralSkewed, MPeaks, MultipleRings (default) 6/2 CellularRule190 (2 rows for +6) 6.28 ArchimedeanChords (approaching 2*pi), FilledRings (average) 7 HeptSpiralSkewed 8 SquareSpiral, PyramidSpiral 16/2 StaircaseAlternating (up and back for +16) 9 TriangleSpiral, TriangleSpiralSkewed 12 AnvilSpiral 16 OctagramSpiral 19.74 TheodorusSpiral (approaching 2*pi^2) 32/4 KnightSpiral (4 loops 2-wide for +32) 64 DiamondArms (each arm) 72 GreekKeySpiral 128 SquareArms (each arm) 128/4 CretanLabyrinth (4 loops for +128) 216 HexArms (each arm) parameter MultipleRings, PyramidRows totient CoprimeColumns, DiagonalRationals divcount DivisibleColumns various CellularRule
The step determines which quadratic number sequences make straight lines. For example the gap between successive perfect squares increases by 2 each time (4 to 9 is +5, 9 to 16 is +7, 16 to 25 is +9, etc), so the perfect squares make a straight line in the paths of step 2.
In general straight lines on stepped paths are quadratics
N = a*k^2 + b*k + c where a=step/2
The polygonal numbers are like this, with the (step+2)-gonal numbers making a straight line on a "step" path. For example the 7-gonals (heptagonals) are 5/2*k^2-3/2*k and make a straight line on the step=5 PentSpiral. Or the 8-gonal octagonal numbers 6/2*k^2-4/2*k on the step=6 HexSpiral.
There are various interesting properties of primes in quadratic progressions. Some quadratics seem to have more primes than others. For example see "Lucky Numbers of Euler" in Math::PlanePath::PyramidSides. Many quadratics have no primes at all, or none above a certain point, either trivially if always a multiple of 2 etc, or by a more sophisticated reasoning. See "Step 3 Pentagonals" in Math::PlanePath::PyramidRows for a factorization on the roots making a no-primes gap.
A 4*step path splits a straight line in two, so for example the perfect squares are a straight line on the step=2 "Corner" path, and then on the step=8 SquareSpiral they instead fall on two lines (lower left and upper right). In that bigger step there's one line of the even squares (2k)^2 == 4*k^2 and another of the odd squares (2k+1)^2. The gap between successive even squares increases by 8 each time and likewise between odd squares.
The self-similar patterns such as PeanoCurve generally have a base pattern which repeats at powers N=base^level, or some multiple or relationship to such a power for things like KochPeaks and GosperIslands.
Base Path ---- ---- 2 HilbertCurve, HilbertSpiral, ZOrderCurve (default), BetaOmega, AR2W2Curve, SierpinskiCurve, HIndexing ImaginaryBase (default), CornerReplicate, ComplexMinus (default), ComplexPlus (default), ComplexRevolving, DragonCurve, DragonRounded, DragonMidpoint, AlternatePaper, DigitGroups (default) 3 PeanoCurve (default), GosperIslands, GosperSide WunderlichMeander, KochelCurve, SierpinskiTriangle, SierpinskiArrowhead, SierpinskiArrowheadCentres, TerdragonCurve, TerdragonMidpoint, UlamWarburton, UlamWarburtonQuarter (each level) 4 KochCurve, KochPeaks, KochSnowflakes, KochSquareflakes, LTiling 5 QuintetCurve, QuintetCentres, QuintetReplicate, CincoCurve 7 Flowsnake, FlowsnakeCentres, GosperReplicate 8 QuadricCurve, QuadricIslands 9 SquareReplicate Fibonacci FibonacciWordFractal parameter PeanoCurve, ZOrderCurve, ImaginaryBase, DigitGroups ComplexPlus, ComplexMinus
Many number sequences plotted on these paths tend to be fairly random, or merely show the tiling or path layout rather than much about the number sequence. Sequences related to the base can make holes or patterns picking out parts of the path. For example numbers without a particular digit (or digits) in the relevant base show up as holes. See for example "Power of 2 Values" in Math::PlanePath::ZOrderCurve.
Some paths are on triangular or "A2" lattice points like
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
These are done in integer X,Y on a square grid using every second square and offset on alternate rows so X and Y are either both even or both odd.
. * . * . * . * . * . * * . * . * . * . * . * . . * . * . * . * . * . * * . * . * . * . * . * . . * . * . * . * . * . * * . * . * . * . * . * .
The X axis and the diagonals X=Y and X=-Y divide the plane into six parts.
X=-Y X=Y \ / \ / \ / ----------------- X=0 / \ / \ / \
The diagonal X=3*Y is the middle of the first sixth, representing a twelfth of the plane.
The resulting triangles are a little flatter than they should be. The triangle base is width=2 and top is height=1, whereas height=sqrt(3) would be equilateral triangles. That sqrt(3) factor can be applied if desired,
X, Y*sqrt(3) side length 2 X/2, Y*sqrt(3)/2 side length 1
Integer Y values have the advantage of fitting pixels on the usual kind of raster computer screen, and not losing precision in floating point results.
If doing a general-purpose coordinate rotation then be sure to apply the sqrt(3) scale factor first or the rotation will be wrong. 60 degree rotations can be made within the integer X,Y coordinates directly as follows (all giving integer results),
(X-3Y)/2, (X+Y)/2 rotate +60 (anti-clockwise) (X+3Y)/2, (Y-X)/2 rotate -60 (clockwise) -(X+3Y)/2, (X-Y)/2 rotate +120 (3Y-X)/2, -(X+Y)/2 rotate -120 -X,-Y rotate 180 (X+3Y)/2, (X-Y)/2 mirror across the X=3*Y twelfth line
The sqrt(3) factor can be worked into a hypotenuse radial distance calculation as follows if comparing distances from the origin.
hypot = sqrt(X*X + 3*Y*Y)
See for instance TriangularHypot which is triangular points ordered by this radial distance.
For a triangular lattice the rotation formulas above allow calculations to be done in the rectangular X,Y coordinates which are the inputs and outputs of the PlanePath functions. An alternative is to number vertically on a 60 degree angle with coordinates i,j,
... * * * 2 * * * 1 * * * j=0 i=0 1 2
Such coordinates are sometimes used for hexagonal grid board games etc, and using this internally can simplify rotations a little,
-j, i+j rotate +60 (anti-clockwise) i+j, -i rotate -60 (clockwise) -i-j, i rotate +120 j, -i-j rotate -120 -i, -j rotate 180
Conversions between i,j and the rectangular X,Y are
X = 2*i + j i = (X-Y)/2 Y = j j = Y
A third coordinate k at a +120 degrees angle can be used too,
k=0 k=1 k=2 * * * * * * * * * 0 1 2
This is redundant since it doesn't number anything i,j alone can't already, but it the advantage of turning rotations into just sign changes and swaps,
-k, i, j rotate +60 j, k, -i rotate -60 -j, -k, i rotate +120 k, -i, -j rotate -120 -i, -j, -k rotate 180
The conversions between i,j,k and the rectangular X,Y are similar to the i,j above with k worked into the X,Y.
X = 2i + j - k i = (X-Y)/2 i = (X+Y)/2 Y = j + k j = Y or j = 0 k = 0 k = Y
Math::PlanePath::SquareSpiral, Math::PlanePath::PyramidSpiral, Math::PlanePath::TriangleSpiral, Math::PlanePath::TriangleSpiralSkewed, Math::PlanePath::DiamondSpiral, Math::PlanePath::PentSpiral, Math::PlanePath::PentSpiralSkewed, Math::PlanePath::HexSpiral, Math::PlanePath::HexSpiralSkewed, Math::PlanePath::HeptSpiralSkewed, Math::PlanePath::AnvilSpiral, Math::PlanePath::OctagramSpiral, Math::PlanePath::KnightSpiral, Math::PlanePath::CretanLabyrinth
Math::PlanePath::HexArms, Math::PlanePath::SquareArms, Math::PlanePath::DiamondArms, Math::PlanePath::AztecDiamondRings, Math::PlanePath::GreekKeySpiral, Math::PlanePath::MPeaks
Math::PlanePath::SacksSpiral, Math::PlanePath::VogelFloret, Math::PlanePath::TheodorusSpiral, Math::PlanePath::ArchimedeanChords, Math::PlanePath::MultipleRings, Math::PlanePath::PixelRings, Math::PlanePath::FilledRings, Math::PlanePath::Hypot, Math::PlanePath::HypotOctant, Math::PlanePath::TriangularHypot, Math::PlanePath::PythagoreanTree
Math::PlanePath::PeanoCurve, Math::PlanePath::HilbertCurve, Math::PlanePath::HilbertSpiral, Math::PlanePath::ZOrderCurve, Math::PlanePath::WunderlichMeander, Math::PlanePath::AR2W2Curve, Math::PlanePath::BetaOmega, Math::PlanePath::KochelCurve, Math::PlanePath::CincoCurve,
Math::PlanePath::ImaginaryBase, Math::PlanePath::SquareReplicate, Math::PlanePath::CornerReplicate, Math::PlanePath::LTiling, Math::PlanePath::DigitGroups, Math::PlanePath::FibonacciWordFractal
Math::PlanePath::Flowsnake, Math::PlanePath::FlowsnakeCentres, Math::PlanePath::GosperReplicate, Math::PlanePath::GosperIslands, Math::PlanePath::GosperSide
Math::PlanePath::QuintetCurve, Math::PlanePath::QuintetCentres, Math::PlanePath::QuintetReplicate
Math::PlanePath::KochCurve, Math::PlanePath::KochPeaks, Math::PlanePath::KochSnowflakes, Math::PlanePath::KochSquareflakes
Math::PlanePath::QuadricCurve, Math::PlanePath::QuadricIslands
Math::PlanePath::SierpinskiCurve, Math::PlanePath::HIndexing
Math::PlanePath::SierpinskiTriangle, Math::PlanePath::SierpinskiArrowhead, Math::PlanePath::SierpinskiArrowheadCentres
Math::PlanePath::DragonCurve, Math::PlanePath::DragonRounded, Math::PlanePath::DragonMidpoint, Math::PlanePath::AlternatePaper, Math::PlanePath::TerdragonCurve, Math::PlanePath::TerdragonMidpoint, Math::PlanePath::ComplexPlus, Math::PlanePath::ComplexMinus, Math::PlanePath::ComplexRevolving
Math::PlanePath::Rows, Math::PlanePath::Columns, Math::PlanePath::Diagonals, Math::PlanePath::DiagonalsAlternating, Math::PlanePath::Staircase, Math::PlanePath::StaircaseAlternating, Math::PlanePath::Corner
Math::PlanePath::PyramidRows, Math::PlanePath::PyramidSides, Math::PlanePath::CellularRule, Math::PlanePath::CellularRule54, Math::PlanePath::CellularRule57, Math::PlanePath::CellularRule190, Math::PlanePath::UlamWarburton, Math::PlanePath::UlamWarburtonQuarter
Math::PlanePath::DiagonalRationals, Math::PlanePath::FactorRationals, Math::PlanePath::GcdRationals, Math::PlanePath::RationalsTree, Math::PlanePath::FractionsTree, Math::PlanePath::CoprimeColumns, Math::PlanePath::DivisibleColumns, Math::PlanePath::File
Math::NumSeq::PlanePathCoord, Math::NumSeq::PlanePathDelta
math-image, displaying various sequences on these paths.
examples/numbers.pl in the Math-PlanePath source code, to print all the paths.
Math::Fractal::Curve, Math::Curve::Hilbert, Algorithm::SpatialIndex::Strategy::QuadTree
PerlMagick (Image::Magick) demo scripts lsys.pl and tree.pl
tree.pl
http://user42.tuxfamily.org/math-planepath/index.html
http://user42.tuxfamily.org/math-planepath/gallery.html
Copyright 2010, 2011, 2012 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/>.
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.