Assignment #4 – Jilemma: A J-Term Dilemma

Concept:

It’s that time of the year where you decide whether your dream of seeing NYC is urgent enough for you to consider going there in the dead of winter where temperatures hide beneath zero (Celsius for the Americans). I’ve looked at infographics that have proven to me that I would become a popsicle a minute after leaving the gates of JFK if I decide to take a January Term in NYC, considering I’ve never spent a minute in sub-zero temperatures. And the snow! Whole other coin. But then I thought why trust the internet? So I set out to make my own infographic on the climate of NYC to determine the best time to take a J-Term there.

Sketch:

Highlight:

// Displaying bars to show monthly precipitation

  let transparency = 0;

  for (i = 0; i < rowNum; i++) {
    noStroke();
    if (i % 2 == 0) {
      //for every non-odd index i.e. 0, 2, 4, etc.
      transparency = 150; //changing the transparency of alternate bars
    } else {
      transparency = 100;
    }
    fill(0, 50, 220, transparency);
    rect(40 + 40 * i, 500, 40, -mPrecipitation[i] / 3);

This piece of code alternates between the bars to change their opacity. It uses the modulus function to determine whether the bar is even or odd and then changes the value in the variable transparency which updates the opacity after the conditional statement.

Reflection:

I would like to change the line drawing to make the corners smooth, and maybe add a pointer where it shows you instantaneous information on the lines on the graph in a text box. Overall I am quite happy with the result! (Even though it does confirm that I’ll become a human popsicle in NYC…)

Leave a Reply