Acme-Pony
view release on metacpan or search on metacpan
execution.
AAAAUUUUTTTTHHHHOOOORRRR
David Cantrell <david@cantrell.org.uk>
This is based on Leon Brocard's 'Buffy' module and
inspired by Damian Conway's brief talk on his Bleach
module.
Leon contributed the code for scaling a vector Pony and
filling it, replacing the bitmap Pony from the previous
versions.
CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
Copyright (c) 2001, David Cantrell. The Artistic Licence
applies.
lib/Acme/Pony.pm view on Meta::CPAN
$scale = 1000 / sqrt(201242 / $wantlength);
}
$scale *= 0.95;
# These were worked out by hand with very accurate graph paper
my @xpoints = (0.26735840061026, 0.290728815714195, 0.297102536393109, 0.299227321848579, 0.322598690483758, 0.348092937511919, 0.36933761362914, 0.403331002479181, 0.430951624181552, 0.450073104062043, 0.471317780179264, 0.484066492912084, 0.49681...
# ... or I may have used Sketch...
my @ypoints = (0.0303060573188429, 0.0417852818858603, 0.0264797254557372, 0.0150004436442946, 0.0417852818858603, 0.0666571259291486, 0.0685702346162763, 0.0915289699724368, 0.118313922702853, 0.141272371836888, 0.169970719476557, 0.21014800546111...
# Scale the points (with ASCII 'fixed' font size scaling too)
@xpoints = map { $_ *= $scale; $_ = int($_) } @xpoints;
@ypoints = map { $_ *= $scale * 5 / 9; $_ = int($_) } @ypoints;
my $n = @xpoints;
return if ($n < 3); # not even a triangle, boring
# Find the min and max y values
my($miny, $maxy) = ($ypoints[0], $ypoints[0]);
foreach my $y (@ypoints) {
if ($y < $miny) {
$miny = $y;
} elsif ($y > $maxy) {
lib/Acme/Pony.pm view on Meta::CPAN
Acme::Pony couldn't access the source file for execution.
=head1 AUTHOR
David Cantrell <david@cantrell.org.uk>
This is based on Leon Brocard's 'Buffy' module and inspired by Damian
Conway's brief talk on his Bleach module.
Leon contributed the code for scaling a vector Pony and filling it,
replacing the bitmap Pony from the previous versions.
=head1 COPYRIGHT
Copyright (c) 2001, David Cantrell. The Artistic Licence applies.
( run in 1.821 second using v1.01-cache-2.11-cpan-49f99fa48dc )