Coursework, notes, and progress while attending NYU's Interactive Telecommunications Program (ITP)

My friend’s twitter poetry animated

I drew inspiration from these flash animated poems and my friend’s twitter poetry to create a page where you can cycle through three animated poems. These don’t quite work right yet for a number of reasons.

The code is basically three constructor functions with a button, and using the mousePressed function to switch between calls to a write method within each function. Each poem moves around the screen in a different pattern.


  • For some reason I couldn’t use the index to sequentially cycle through the array that included each line of poetry as an item. I used random(0,i), similar to what we saw in the example in class. It’s kind of cool that the poem is progressively revealed but this isn’t really my intention.
Screen Shot 2015-10-07 at 8.20.12 PM

Code that only displayed the last item of the array, instead of cycling through

  • Some of the items never appear! I don’t know why.
  • I tried to mess with frameCount so I could set the duration of each individual line on the screen, but I struggled with figuring out how to keep from just creating an infinite loop somewhere. Maybe there’s an easier way to set duration?
Screen Shot 2015-10-08 at 2.18.29 AM

I’m sure there is a good math reason this doesn’t work

  • The way the code is currently structured, it’s not clear to me whether it could or should be further abstracted. I tried cleaning it up so that there was just one function that called each array (which hold each poem’s content), but I got confused about setting an array within the method to an array defined in the constructor function. Maybe there’s a way to do this but I couldn’t get the syntax and it was hard for me to wrap my head around.
Screen Shot 2015-10-08 at 1.04.59 PM

I don’t know what I’m doing, either

A note on images

Separately, this week I figured out how to load images. I realized a lot of people upload images to their sketches and that it probably saves a lot of time! After a lot of confusion a classmate explained that you need to save the image to your sketch’s parent directory, which I don’t think the documentation conveys very clearly.

Post a Comment

Your email is kept private. Required fields are marked *