<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Graphviz is a lot of fun! Thanks for mentioning it, Ramana. This makes a map of the “squared mod 11” function (2*2=4, 4*4=16, 16%11=5). I tweaked the location of one of the nodes, because the default starting location came out ugly. You can change all the colors and shapes, too.</div><div class=""><br class=""></div><div class=""> -bob</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-family: Menlo;" class="">use strict;</div><div style="margin: 0px; font-family: Menlo;" class="">use warnings;</div><div style="margin: 0px; font-family: Menlo;" class="">use GraphViz2;</div><div style="margin: 0px; font-family: Menlo;" class="">my $n = 11;</div><div style="margin: 0px; font-family: Menlo;" class="">my $g = GraphViz2->new(global => { directed => 1 });</div><div style="margin: 0px; font-family: Menlo;" class="">$g->add_node(name => 6, pos => '100,100');</div><div style="margin: 0px; font-family: Menlo;" class="">for my $i (0 .. $n-1) {</div><div style="margin: 0px; font-family: Menlo;" class="">   my $j = ($i * $i) % $n;</div><div style="margin: 0px; font-family: Menlo;" class="">   $g->add_edge(from => $i, to => $j);</div><div style="margin: 0px; font-family: Menlo;" class="">}</div><div style="margin: 0px; font-family: Menlo;" class="">$g->run(driver => 'neato', format => 'png', output_file => "$n.png");</div></div><div class=""><br class=""></div><div class=""><img height="423" width="486" apple-width="yes" apple-height="yes" apple-inline="yes" id="B766F041-78EF-4F99-BDDD-73AB9E187466" src="cid:C241419C-3AB3-40CB-97A6-5FBF5AB44B68@home" class=""></div></body></html>