Your browser may have trouble rendering this page. See supported browsers for more information.

This page shows the source for this entry, with WebCore formatting language tags and attributes highlighted.

Title

Graphing Web Sites

Description

<img attachment="earthli.com.graph.png" align="left" class="frame" caption="earthli.com tag graph">The article <a href="http://www.aharef.info/2006/05/websites_as_graphs.htm">Websites as graphs</a> introduces an online tool for creating art out of HTML code. The <a href="http://www.aharef.info/static/htmlgraph/">online version</a> of the grapher accepts a URL and then retrieves and processes the page, tag by tag, building a graph, which displays the connections and nesting. The graph is built in real-time, but deliberately slowly<fn>, so that it starts with a few large nodes, then seems to zoom out as more nodes are added. As new branches lead to more and more clusters of nodes, the branches "wave" around to get out of each other's way and detangle slowly and elegantly, like an anemone in a gentle current. Click the link to watch it generate <a href="http://www.aharef.info/static/htmlgraph/?url=http%3A%2F%2Fearthli.com">earthli's home page</a>, shown to the left. Links are blue, tables are red, boxes are green, forms are yellow and paragraphs are orange. The <a href="http://www.aharef.info/static/htmlgraph/sourcecode.html">source code</a> is in Java and is freely available. It's only a few hundred lines and leans heavily on some external Java physics and rendering libraries. It's an excellent example of the power of base libraries that provide such capabilities in a straightforward and easy-to-use way. Compiling and running the code, however, can only be done with <a href="http://www.processing.org/">Processing</a>, <iq>an open source programming language and environment for people who want to program images, animation, and sound</iq>. It runs on Windows, Mac OS X and Linux. <ft>I'm assuming it's deliberate. The source code has a few calls to <c>tick</c> functions that must increment the physics model. Not sure whether it also pauses for a little while. Otherwise, this demo is a good argument for those who say that Java is just damned slow.</ft>