https://github.com/dnmfarrell/math-shape-grid
2d grid for printing Math::Shape::Point objects
https://github.com/dnmfarrell/math-shape-grid
Last synced: 9 months ago
JSON representation
2d grid for printing Math::Shape::Point objects
- Host: GitHub
- URL: https://github.com/dnmfarrell/math-shape-grid
- Owner: dnmfarrell
- License: other
- Created: 2014-08-31T21:28:50.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-01T17:28:11.000Z (almost 12 years ago)
- Last Synced: 2025-01-16T16:49:41.538Z (over 1 year ago)
- Language: Perl
- Homepage: https://github.com
- Size: 141 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.pod
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
=pod
=encoding UTF-8
=head1 NAME
Math::Shape::Grid - a 2d grid for visualizing Math::Shape::Point objects on the terminal
=head1 VERSION
version 0.03
=head1 SYNOPSIS
my $p1 = Math::Shape::Point->new(1, 1, 0);
my $p2 = Math::Shape::Point->new(2, 2, 0);
my $p3 = Math::Shape::Point->new(3, 3, 0);
Math::Shape::Grid::print({ p1 => $p1, p2 => $p2, p3 => $p3 });
# prints:
p1 x: 1, y: 1, r: 0
p2 x: 2, y: 2, r: 0
p3 x: 3, y: 3, r: 0
-5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 x
8 . . . . . . . . . . . . . .
7 . . . . . . . . . . . . . .
6 . . . . . . . . . . . . . .
5 . . . . . . . . . . . . . .
4 . . . . . . . . . . . . . .
3 . . . . . . . . p3 . . . . .
2 . . . . . . . p2 . . . . . .
1 . . . . . . p1 . . . . . . .
0 . . . . . . . . . . . . . .
-1 . . . . . . . . . . . . . .
-2 . . . . . . . . . . . . . .
-3 . . . . . . . . . . . . . .
-4 . . . . . . . . . . . . . .
-5 . . . . . . . . . . . . . .
y
=head1 FUNCTIONS
=head2 print
Prints a grid to STDOUT. Requires a hashref of L objects.
Math::Shape::Grid::print($points);
=head1 REPOSITORY
L
=head1 AUTHOR
David Farrell
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by David Farrell.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
