NAME

Math::PlanePath::MathImageFilledRings -- concentric filled lattice rings

SYNOPSIS

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

DESCRIPTION

This path puts points on the pixels of filled circles of width 1 unit each. This is the algorithm of the X11 drawing operations.

                                                    5

                                                    4

                                                    3

                                                    2

                                                    1

                                                  y=0

                                                   -1

                                                   -2

                                                   -3

                                                   -4

                                                   -5

 -5  -4  -3  -2  -1  x=0  1   2   3   4   5

FUNCTIONS

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

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

Create and return a new path object.

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

For $n < 1 the return is an empty list, it being considered there are no negative points.

The behaviour for fractional $n is not settled yet. A position on the line segment between the integer N's might make sense, but perhaps pointing 17.99 towards the "6" position to make a ring instead of towards the "18".

SEE ALSO

Math::PlanePath, Math::PlanePath::PixelRings, Math::PlanePath::Hypot, Math::PlanePath::MultipleRings