I was able to call 10 random words from Wordnik (with the appropriate formatting and no extra characters!) using the JSON examples we went through in class. After I finally got the words displaying correctly, I wanted to make them do something fun. I had originally planned to have the words follow the mouse somehow. I played around with some different word patterns, but was having trouble finding one I liked:

randomwordsfollowmouse

starwordsmovingstarwords

I was searching around on OpenProcessing for animations that I could incorporate into my code when I stumbled upon a sketch that displays digital “word magnets.” By combining my existing sketch with the word magnet sketch and swapping out a couple of lines of code where the words were called and populated, I managed to populate the word magnets with my random words from Wordnik. And because I wanted to actually be able to play with it, I added some basic pronouns and verbs to show up along with the 10 random words from Wordnik.

wordmagnetsoriginalcode wordmagnetscallrandomwordsrandomwordmagnets

Between the suggestions I got in class and my own reflections, I have the following ideas for future iterations:

  • change the background of the sketch window from white to a fridge(?) image
  • add functionality for users to refresh the words on the magnets by pressing a key
  • use the html calls on the Wordnik API site to get certain numbers of different types of speech and populate the words that way (instead of using a temboo call each time)