More selected projects

Twitter-Ferns Mashup

We cannot ignore how far removed the world of purely computer-generated graphics can be from the ‘real word’… Can we derive much from online sources provided by sites such a Twitter? … Can we combine the two together to highlight this?

produced by: James Tregaskis


We cannot ignore how far removed the world of purely computer-generated graphics can be from the ‘real word’… Can we derive much from online sources provided by sites such a Twitter? … Can we combine the two together to highlight this?

The commentary I chose for the video clip provides: no explanation/a need for much explaining/laughter and hilarity

Why do we take ourselves so seriously?

Is art allowed to simultaneously entertain us and shed light on problems – or just delude us into agreeing upon the wonderful quality of what later turns out to be shallow and pointless?

If I have made you smile, then I am happy.

Concept and background research

The Ferns

Fern fractals were developed in the mid 80s, first by John Hutchinson in 1981 and later popularised by Michael Barnsley[i]. This was in part made possible with the increasing availability of computational resources. The iteration function used to construct these ferns uses four Affine functions, each one with a particular probability, all four adding up to 100%. The variation in the fern shapes is due to the proportion given to each of the four affine functions, one for the stem, the right and the left branches and the leaves.


As part of this generative art piece, I wanted to use a constantly updated source of comments, all based on keywords that might bring some elements of contemporary concerns crop up in the media frequently. The results are collected in to burst of data and send via OSC to an Open Frameworks application to render the texts into the ferns animation.

The twitter feeds are cached into memory in order to reduce the number of Twitter requests. There is a limit to the permitted frequency requests, especially on a cost-free account that I had set up.

It was hard to resist Twitter, although it has gained a reputation for being toxic and malevolent, there having been a few cases where people have fallen foul of the temptation to transmit messages that rebound with negative outcomes. I have not shied away from this, in fact I embrace it and intentionally hoped the tweets are juxtaposed between anodyne subject matter and the grotesque. Behind (or in front of this) we have a lively random display of Barnsley ferns, as many as I could muster, given the constraints of running it on my laptop.

The values for the Barnsley ferns were adapted from a Ferns of The Canberra Region blog by David Nicholls and Christopher Nicholls[ii] and Computational Beauty of Nature by Gary Flake.

The following ferns were rendered


Culcita or Tree Fern[2]


Barnsley fern

Modified Barnsley

Also, a ‘5-part probability’ fern [4]

Other source of inspiration at[5] and the Boston University Technology Projectx blog [6].

The Video

I am fully aware of how tenuous the relationship between ferns and twitter feeds have been presented here. However, combining the deadly earnest rendition of ferns colliding with the meaningless buzz of twitter seems to take us into a tranquil ‘third place’ – the commentary, I edited from a rambling episode of ‘Novara’ on Resonance104.4 where the stammering presenters desperately try to convince us of the merits of this outstanding piece of art. The ferns themselves? They look a little sad at this time of year, but I a volunteer gardener, watering Arlington Square every Wednesday. I have watched them grow since they were planted in 2013.








1. Processing

Using OSC , using the Twitter4j [7] library. I had to set up a developer account at in order to log in and send search requests in a synchronous way. I made sure the Twitter daily request allowance was not exceeded by throttling requests in the Processing application using frameCount% == nn. The OSC link was made to OF via a port number 12345 as per examples provided in class.

2. OpenFrameworks

My original object oriented model was to extend a basic plant class for each Fern/plant and implement a different draw method for each- however I found that storing the subclasses in a vector of led to 'object slicing' and I lost the id for each member in the vector. I ended up with the less elegant solution of having different methods for each type of fern all inside the plant class. The Garden class contains all the Plants. Each plant will have been displayed with a tiny amount of randomness for the variables used in each of the Affine transformations (mapped to 'sensible values as well).

Referring to Week 18 of the course - naturally, and Chapter 11 from the openFrameworks book found in gitlab.

I had problems using the library provided by @cbaker on Github - I spent many hours trying to get it to work, asking questions on the OpenFrameworks forum - to no avail, so I opted to the less elegant solution of using Processing to act as an API client for Twitter and message to OpenFrameworks via OSC, passing on the data coming back from Twitter.


Future development

I would have preferred a landscape of ferns tather than all in one spot. The 'garden' might show more scope for interactivity being displayed, based on metrics from appointed searches online. Further APIs would be a useful area of exploration, providing environmental data. I am a little dubious about this route as it seems a bit 'obvious' in hindsight.

Self evaluation

The changing nature of the ferns was rendered by modifying the probabilities in the Barnsley method of displaying the ferns. This worked quite well, the rendering was acceptably fast as long as not too many were being displayed over time. The link between the Twitter feeds turned out to be tenuous and although this was a disappointment that I did not 'tie in' and environmental effect as Jane Prophet has done with her Pocket Penjing work [8], the Twitter feeds themselves had a life of their own and I enjoyed contrasting the straight-faced ferns with colourful language and points of view!

Certainly a disconnect between graphics and feed but if anything, a cause for something to be celebrated.





[4] Computational Beauty of Nature by Gary William Flake pp 103-110





[i] Fractals Everywhere, Michael Barnsley