Algorithm::Line::Bresenham 0.11
Sponsored Links
Algorithm::Line::Bresenham 0.11 Ranking & Summary
File size:
0.003 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
914
Date added:
2007-05-16
Publisher:
osfameron
Algorithm::Line::Bresenham 0.11 description
Algorithm::Line::Bresenham is a Perl module that contains a simple pixellated line-drawing algorithm.
SYNOPSIS
use Algorithm::Line::Bresenham qw/line/;
my @points = line(3,3 => 5,0);
# returns the list: [3,3], [4,2], [4,1], [5,0]
line(3,3 => 5,0, &draw_line);
# calls draw_line on each point in turn
Bresenham is one of the canonical line drawing algorithms for pixellated grids. Given a start and an end-point, Bresenham calculates which points on the grid need to be filled to generate the line between them.
Googling for Bresenham, and line drawing algorithms gives some good overview. The code here takes its starting point from Mark Feldmans Pascal code in his article Bresenhams Line and Circle Algorithms at http://www.gamedev.net/reference/articles/article767.asp.
FUNCTIONS
line
line ($from_y, $from_x => $to_y, $to_x);
Generates a list of all the intermediate points. This is returned as a list of array references.
line ($from_y, $from_x => $to_y, $to_x, &callback);
Calls the referenced function on each point in turn. The callback could be used to actually draw the point. Returns the collated return values from the callback.
circle
my @points = circle ($y, $x, $radius)
Returns the points to draw a circle with
SYNOPSIS
use Algorithm::Line::Bresenham qw/line/;
my @points = line(3,3 => 5,0);
# returns the list: [3,3], [4,2], [4,1], [5,0]
line(3,3 => 5,0, &draw_line);
# calls draw_line on each point in turn
Bresenham is one of the canonical line drawing algorithms for pixellated grids. Given a start and an end-point, Bresenham calculates which points on the grid need to be filled to generate the line between them.
Googling for Bresenham, and line drawing algorithms gives some good overview. The code here takes its starting point from Mark Feldmans Pascal code in his article Bresenhams Line and Circle Algorithms at http://www.gamedev.net/reference/articles/article767.asp.
FUNCTIONS
line
line ($from_y, $from_x => $to_y, $to_x);
Generates a list of all the intermediate points. This is returned as a list of array references.
line ($from_y, $from_x => $to_y, $to_x, &callback);
Calls the referenced function on each point in turn. The callback could be used to actually draw the point. Returns the collated return values from the callback.
circle
my @points = circle ($y, $x, $radius)
Returns the points to draw a circle with
Algorithm::Line::Bresenham 0.11 Screenshot
Advertisements
Algorithm::Line::Bresenham 0.11 Keywords
Bresenham 0.11
Perl module
line
Algorithm::Line::Bresenham
points
X
y
pixellated
AlgorithmLineBresenham
Algorithm::Line::Bresenham 0.11
Libraries
Programming
Bookmark Algorithm::Line::Bresenham 0.11
Algorithm::Line::Bresenham 0.11 Copyright
WareSeeker periodically updates pricing and software information of Algorithm::Line::Bresenham 0.11 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Algorithm::Line::Bresenham 0.11 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
Algorithm::SixDegrees is a Perl module that can find a path through linked elements in a set. Free Download
Algorithm::BinPack is a Perl module that can efficiently pack items into bins. Free Download
Algorithm::Permute is a Perl module with handy and fast permutation with object oriented interface. Free Download
Algorithm::Pair::Best is a Perl module to select pairings (designed for Go tournaments, but can be used for anything, really). Free Download
Algorithm::Numerical::Sample is a Perl module that can draw samples from a set. Free Download
Algorithm::ScheduledPath is a Perl module that helps you to find scheduled paths in a directed graph. Free Download
Algorithm::Loops is a Perl module with looping constructs: NestedLoops, MapCar*, Filter, and NextPermute*. Free Download
Algorithm::LUHN is a Perl module to calculate the modulus 10 double add double checksum. Free Download
Latest Software
Popular Software
Favourite Software