The new tag cloud…

The new tag cloud…

PHP generates PNG images and scans for the transparent spaces to construct a simplified bitmap of the font’s opaque shapes. This information is then dumped into javascript where the actual placement happens. The tags are added one at a time from largest to smallest by a cursor that spirals outward from the center of the cloud. The tags’ masks are intermittently compared to the composite used space mask from the previously placed tags until an empty space is found. Google’s Chrome beta finishes 100 placements in less than a second however Firefox and IE lag behind finishing in three to five seconds.

Image and position caching will probably be used in the final system. The javascript is too resource intensive and the automated placement is a bit too unreliable for a production environment. Authenticated users will have to manually adjust the tag cloud content for a more consistent result… but for the moment it’s still a toy while we work through our lists of deliverables.

demo | source

Tags: , , , , , , , ,

Paul Wells

I'm currently working as a web developer for EMU Marketing. I've been in and out of the office since 2004.

3 Comments Leave yours

  1. Great choice for your first post Paul!

  2. waw it’s beutiful.. can I publish this article in my blog.. with indonesian language…

  3. Paul Wells #

    Yes, of course, just link back here please :)

1 Trackbacks

Leave a Reply