Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Math::PlanePath 88

    Download button

    No screenshots available
    Downloads: 226  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Kevin Ryde | More programs
    Perl Artistic License / FREE
    September 22nd, 2012, 13:49 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Math::PlanePath description

    Points on a path through the 2-D plane

    Math::PlanePath is the Perl class for some mathematical paths which turn an integer position $n into coordinates $x,$y in the plane. The current classes include

     SquareSpiral four-sided spiral
     PyramidSpiral square base pyramid
     TriangleSpiral equilateral triangle
     TriangleSpiralSkewed equilateral skewed for compactness
     DiamondSpiral four-sided spiral, looping faster
     PentSpiralSkewed five-sided spiral, compact
     HexSpiral six-sided spiral
     HexSpiralSkewed six-sided spiral skewed for compactness
     HeptSpiralSkewed seven-sided spiral, compact
     OctagramSpiral eight pointed star
     KnightSpiral an infinite knight's tour
     GreekKeySpiral spiral with Greek key motif

     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 circles by pixels
     Hypot points by distance
     HypotOctant first octant points by distance
     TriangularHypot points by triangular lattice distance
     PythagoreanTree primitive triples by tree

     PeanoCurve self-similar base-3 quadrant traversal
     HilbertCurve self-similar base-2 quadrant traversal
     ZOrderCurve replicating Z shapes
     KochCurve replicating triangular notches
     KochPeaks stacked replicating notches
     KochSnowflakes concentric snowflake rings

     Rows fixed-width rows
     Columns fixed-height columns
     Diagonals diagonals down from the Y to X axes
     Staircase stairs down from the Y to X axes
     Corner expanding stripes around a corner
     PyramidRows expanding rows pyramid
     PyramidSides along the sides of a 45-degree pyramid


    The paths are object oriented to allow parameters, though only a few subclasses have any parameters. See examples/numbers.pl for a cute way to print samples of all the paths.

    The classes are generally 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, like SacksSpiral and VogelFloret, are designed for a unit circle at each $n but they too can give in-between positions on request.

    In general there's no parameters for scaling, or an offset for the 0,0 origin, or reflection up or down. Those things are thought better done by a general coordinate transformer that might expand or invert for display. Even clockwise instead of counter-clockwise spiralling can be had just by negating $x (or negate $y to stay starting at the right), or a quarter turn with -$y,$x. Try Transform::Canvas for scaling/shifting, and Geometry::AffineTransform for rotating too.

    SYNOPSIS

     use Math::PlanePath;
     # only a base class, see the subclasses for actual operation



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    2-D plane | plane path | Perl module | Perl | 2D | plane

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM