go ahead... be a heretic PerlMonks

### Re^2: Bear is driving?

by teamster_jr (Curate)
 on Apr 03, 2006 at 09:39 UTC ( #540887=note: print w/replies, xml ) Need Help??

use GD;
\$i = new GD::Image( 153, 153, );
\$i->colorAllocate( 200, 200, 200 );

sub l {
\$p = new GD::Polygon;
...
\$i->filledPolygon( \$p, shift );
}

sub d {
l @_, 0,  0,  20, -10, 20, 10, -20, 10, \$i->colorAllocate( 153, 15
+3, 153, );
l @_, 20, 10, 20, -10, 0,  20, -20, 10, \$i->colorAllocate( 20,  0,
+   0 );
}

sub a {
d @_;
l @_, 0, 0, 0, 20, 20, 10, 0, -20, \$i->colorAllocate( 20, 153, 153
+, );
}

a("73","73");
a("43","88");
...
a("43","28");
a("73","43");
a("103","58");

d("73","73");

open FH, ">o.png";
binmode FH;
print FH \$i->png

\$\$_ = ord(shift) - 20 for qw.x y.;

a"]","]";
a"?","l";
...
a"]","?";
a"{","N";
d"]","]"

\$_ = "]]?l!{!]!?!!?0]?{N";
s#(.)(.)#a"\$1","\$2";\n#g;
/".+;/;
\$_ .= "d\$&";
eval;

for\$r(qw.\$i-> colorAllocate( Polygon shift) l@_,
KK); GD 10, I sub 153, 20 new.){\$l=chr 65+\$c++;s#\$l#\$r#g}

Create A New User
Node Status?
node history
Node Type: note [id://540887]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2017-06-26 14:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
How many monitors do you use while coding?

Results (583 votes). Check out past polls.