2 comments

[ 0.22 ms ] story [ 12.8 ms ] thread
See http://www.jasondavies.com/wordcloud/ for a version that uses JavaScript and canvas for bitmap-based collision detections.
Looks interesting, thanks for sharing it! Your algorithm is also based on the same "spiral out" technique described by Jonathan Feinberg on StackOverflow. (It's also what I used in my reply to that Mathematica.SE question.) Heike's solution is interesting because is always finds the tightest possible fit with a not-very-bad performance (the image processing operation used can be implemented in terms of correlations, which can be fast when done using fft).