WordCram

open-source word clouds for Processing

Follow WordCram on Twitter @wordcram

Ask a Question in the Forum /wordcram

Pull Requests Welcome on GitHub danbernier/WordCram

Latest News

WordCram 1.0.0 Released, for Processing 3.0

WordCram 0.6.2 Released

WordCram 0.6.1 Released

All posts

Faster WordCrams? An Experiment

Simulated annealing is a programming trick for quickly packing a bunch of things together. It’s based on the idea of annealing, where (as I understand it) a metal is heated, which gives the molecules enough energy to wiggle, then cooled slowly, which lets the molecules settle into a denser arrangement.

I’ve been wondering for a while whether this could make WordCram faster. It seems well-suited to the problem - the heart of WordCram is packing non-overlapping shapes together.

So I made this Processing experiment sketch, which uses simulated annealing to arrange circles.

I think it works pretty well - it can arrange 200 circles of different sizes along a line in under a second. (My first experiment was a lot slower, which gives you an idea how powerful this trick can be - once you get it right.)

<<

>>