WordCram 0.5.4 released

Just a tiny bug fix for making word crams with the fromTextString method. Download only the freshest of WordCram bits!

Posted in release | Tagged

Independence Day

Happy Fourth of July!

In the spirit of independence, here’s a WordCram made from the U.S. Declaration of Independence, with open-source software (Processing and WordCram), and open-source fonts (AveriaSerif-Regular and Jane Austen):

You can see it at OpenProcessing; here’s the source, in its entirety:

import wordcram.*;

size(800, 500);

background(#F5F1E3);

PFont averia = createFont("AveriaSerif-Regular.ttf", 1);
PFont janeAusten = createFont("JaneAust.ttf", 1);

new WordCram(this)
  .fromTextFile("declaration.txt")
  .withFonts(averia, janeAusten)
  .withColors(#B20E0E, #0E12B2)
  .angledAt(0)
  .withWordPadding(1)
  .drawAll();
Posted in examples

WordCram 0.5.2 released

WordCram 0.5.2 makes it easier for your users to click on words. You can download the .zip or the .tar.gz at the new github download page.

It’s common to let people interact with a word cloud by clicking on the words. But WordCram has always been very particular about where you click: you have to click directly on the part of the word that’s colored in. If you click in the middle of an O, or between the arms of an X, it won’t register. This is pretty frustrating, because people aren’t that precise, and no one expects it to work that way.

It does it this way because words can appear inside other words, or intertwined with them. So it can’t just count it as a click, if you click inside the word’s box. (That’s why it was so fussy, at first – being fussy side-stepped this problem.)

WordCram 0.5.2 solves this twist by giving you the smallest word whose box contains your click, on the theory that, if you’d wanted that bigger word, you probably wouldn’t have clicked so close to the smaller word.

There’s an example sketch on OpenProcessing. Try it out, and see whether it doesn’t feel natural. Or download it, and try it out in your own sketch!

Posted in examples, release

Spring Cleaning for Smoother WordCram Builds

I’ve been frustrated with WordCram’s automated build for a long time. It was a giant tangle of ant, JUnit, SVN, javadoc, and googlecode file-uploads, and it was always a struggle to change it, or even remember what it did for me.

Moving to github aggravated this, because it meant the automated build had to change. Release downloads go to a different place. I’d like to use Git’s more flexible branching. And where should I host the javadocs?

So this weekend, I re-wrote the build in rake, which has already paid off: WordCram’s downloads & javadoc are now officially hosted on github, and I’ve started using a more effective branching strategy (based on git flow). And new ideas, like generating simpler HTML documentation, or automatically tweeting or blog-posting releases, will be easy to implement.

But the biggest benefit is that it’ll make WordCram so much easier to work on. Small bug fixes can be quickly released, and I can make progress on bigger features and improvements on a separate branch, easily merging between them. I’m looking forward to getting back into it!

Posted in improvements

WordCram 0.5.1 released

Two tiny bug fixes: preventing array-out-of-bounds errors when maxNumberOfWordsToDraw is set too high, and ignoring skipped words when checking for overlaps.

Grab the fresh bits at github! The deploy process is still not automated (after moving to github), so if anything’s amiss, let me know.

Posted in release

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.)

Posted in improvements | 3 Comments

WordCram’s moving to GitHub

I started moving WordCram on to GitHub, and most things are in place, like the issues list and the wiki. I still need to copy over the downloads. Got the downloads, too! (Only 0.5.0 for now – the older ones are still at googlecode, but I’ll probably copy them too, eventually.)

Let me know if I missed anything!

Posted in improvements | 1 Comment