Waleed Kadous Extracurricularities » Quadtree Fractals

Quadtree Fractals

Once upon a time, there was this tutor in concurrent computing who was responsible for developing an assignment. He wanted to come up with an assignment that attempted to be fun for the students. Fun and concurrent computing, however, appeared to go together as well as justice and United States Foreign Policy. Still, he tried his best.

He found an interesting technique called quadtrees for image compression that presented some parallelisation possibilities. Accidentally along the way, he discovered that you could use them to make some interesting shapes that were recursive (or fractal) in nature.

If you are interested in the source for quad2pbm, then it's in java (JDK 1.1). You can have a look at that here.

Each of the below images is generated at 512x512, then reduced to a 128x128 thumbnail. The full image is available by clicking on the thumbnail image. The source (for quad2pbm) is also included should you be interested.

Satellite Squares

Tree 1 Source

Triangle Explosion

Tree 2 Source

Diamond Rose

Tree 3 Source

The Infinite Rug

Tree 4 Source
WARNING: The above is a bit of a hack. It relies on the fact that pixels are white by default, and that if the recursion goes so deep that the size is less than one pixel, it is left as white, not black.

Arabesque

Source
 

Content managed by the Etomite Content Management System.

Etomite »

« Etomite Parse Error »

Etomite encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
 
PHP error debug
  Error: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 
  Error type/ Nr.: Warning - 2 
  File: /tmp_amd/adams/export/adams/1/waleed/public_html/new/index.php 
  Line: 117 
  Line 117 source: if(@!$this->rs = mysql_connect($this->dbConfig['host'], $this->dbConfig['user'], $this->dbConfig['pass'])) {  
 
Parser timing
  MySQL: 0.0000 s s(0 Requests)
  PHP: 1.5120 s s 
  Total: 1.5120 s s 

Content managed by the Etomite Content Management System.